The following properties needs to be set up specifically for your environment and access to AWS S3.
-
Open the <classpathRoot>/alfresco-global.properties
file.
If you plan to use IAM roles instead of AWS access and secret keys, ensure you have Configuring 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 On-premises configuration before continuing.
-
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.
-
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.
-
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.
-
Add the connector.s3.bucketRegion property.
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. -
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
-
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.
-
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 the CachingContentStore properties in the Alfresco Content Services documenattion 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.
-
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.
-
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 for naming guidelines, as the properties must respect the same restrictions as if they were added via the AWS Management Console. - 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 Enable deleted content store.
-
Save the alfresco-global.properties file.
You are now ready to start Alfresco Content Services.