The Content Connector for AWS S3 is configured using properties set in the alfresco-global.properties file.
Default settings
These are the configuration properties that are applied when you install the S3 Connector:
s3.bucketLocation=EU
s3.encryption=AES256
s3.flatRoot=true
system.content.caching.maxUsageMB=51200
system.content.caching.minFileAgeMillis=0
s3.maxErrorRetries=3
s3.useTenantDomainInPath=false
s3.autoLowerCaseBucketName=false
If you need to override them for your environment, check the available settings in the configuration guides or properties reference.
Basic configuration properties
-
Open the
<classpathRoot>/alfresco-global.propertiesfile.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.
-
Add the
s3.accessKeyproperty, for example:s3.accessKey=AKIAIOSFODNN7EXAMPLEThe access key is required to identify the AWS account and can be obtained from the AWS Management Console. See AWS Credentials for access details.
-
Add the
s3.secretKeyproperty, for example:s3.secretKey=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYThe secret key is required to identify the AWS account and can be obtained from the AWS Management Console. See AWS Credentials for access details.
-
Add the
s3.bucketNameproperty, for example:s3.bucketName=myawsbucketThe 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.logfile. See S3 bucket restrictions for more information on bucket naming. -
Add the
s3.bucketLocationproperty as specified in the AWS service endpoints page.The value is taken from the Code column. For example, for Region Name Europe (Frankfurt):
s3.bucketLocation=eu-central-1Note
If you use a region other than the US East (N. Virginia) endpoint (previously named US Standard) to create a bucket,
s3.bucketLocationis a mandatory field. Use the AWS service endpoints for guidance on the correct value.Optional configuration properties
-
If you plan to use the AWS KMS service to manage encryption, you'll need to change the default
s3.encryptionsetting.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 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=0The 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 before marking them for deletion:
s3.abortIncompleteMultipartUploadDays=1See Multipart upload overview for more details.
-
Save the
alfresco-global.propertiesfile.You are now ready to start Alfresco Content Services.