You are here

Configuring the S3 Connector

The S3 Connector is configured using properties set in the global properties file.

Default settings

These are the configuration properties that are applied when you install the S3 Connector:
connector.s3.bucketRegion=us-east-1
connector.s3.encryption=AES256
system.content.caching.maxUsageMB=51200
system.content.caching.minFileAgeMillis=0
connector.s3.maxErrorRetries=3
# Default S3 content store subsystem
filecontentstore.subsystem.name=S3OnPrem
If you need to override them for your environment, check the available settings in the configuration guides or properties reference.

Basic configuration properties

  1. Open the <classpathRoot>/alfresco-global.properties file.

    If you plan to use IAM roles instead of AWS access and secret keys, ensure you have configured AWS Identity and Access Management correctly before continuing from step 4.

    If you have existing content in a local contentstore (i.e. where Alfresco Content Services is deployed on-premises) and you'd like to transition to using AWS S3 as the only content store, ensure you include the property described in Configuring S3 Connector on-premises before continuing.

  2. Add the connector.s3.accessKey property, for example:

    connector.s3.accessKey=AKIAIOSFODNN7EXAMPLE

    The access key is required to identify the AWS account and can be obtained from the AWS Management Console. See AWS Credentials for access details.

  3. Add the connector.s3.secretKey property, for example:

    connector.s3.secretKey=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

    The secret key is required to identify the AWS account and can be obtained from the AWS Management Console. See AWS Credentials for access details.

  4. Add the connector.s3.bucketName property, for example:

    connector.s3.bucketName=myawsbucket

    The bucket name must be unique among all AWS users globally. If the bucket does not already exist, it will be created, but the name must not have already been taken by another user. If the bucket has an error, it will be reported in the alfresco.log file. See S3 bucket restrictions for more information on bucket naming.

  5. Add the connector.s3.bucketRegion property as specified in the AWS service endpoints page.

    The value is taken from the Code column. For example, for Region Name Europe (Frankfurt):

    connector.s3.bucketRegion=eu-central-1
    Note: If you use a region other than the US East (N. Virginia) endpoint (previously named US Standard) to create a bucket, connector.s3.bucketRegion is a mandatory field. Use the AWS service endpoints for guidance on the correct value.

  6. Set the type of content store subsystem, for example:

    filecontentstore.subsystem.name=S3

    This sets the active content store subsystem to S3 only, as opposed to the default subsystem, S3OnPrem, which sets an aggregating content store: S3 and file system.

    Note: This setup is recommended for a new clean installation of Alfresco Content Services and the S3 Connector.

    Optional configuration properties

  7. If you plan to use the AWS KMS service to manage encryption, you'll need to change the default s3.encryption setting.

    See Configuring AWS Key Management Service for more encryption options.

  8. Set where the cached content is stored, and how much cache size you need.

    The cached content location (and default value) is dir.cachedcontent=${dir.root}/cachedcontent. See CachingContentStore properties for more information on the caching content store.

    Note: The size of the local caching content store can be configured as necessary to limit its use to a maximum overall size or by files with a maximum file size. For example:
    # Maximum disk usage for the cache in MB 
    system.content.caching.maxUsageMB=51200
    # Maximum size of files which can be stored in the cache in MB (zero implies no limit) 
    system.content.caching.maxFileSizeMB=0

    The S3 Connector supports multipart uploads where files larger than 20MB are split. The file upload is attempted and retried, in case there are issues, up to a specific limit.

  9. Set the number of days that Amazon S3 should keep the files which are incomplete or aborted uploads, before marking them for deletion:

    connector.s3.abortIncompleteMultipartUploadDays=1

    Note: If lifecycle configuration on the bucket is not required, then set the value to 0:
    connector.s3.abortIncompleteMultipartUploadDays=0

    See Multipart upload overview for more details.

  10. If you want to apply a tag to your content when it's written into the S3 bucket, you can add the connector.s3.tagName and connector.s3.tagValue properties.

    See Properties reference for more details.

    Note: Use the AWS documentation Object key and metadata for naming guidelines, as the properties must respect the same restrictions as if they were added via the AWS Management Console.
  11. Starting from version 3.1, the S3 Connector has the deleted content store disabled by default, since this feature is already present in Amazon's S3 service. For details on how to re-enable it, see S3 Connector deleted content store.
  12. Save the alfresco-global.properties file.

    You are now ready to start Alfresco Content Services.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.