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:
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
-
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
connector.s3.accessKeyproperty, for example:connector.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
connector.s3.secretKeyproperty, for example:connector.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
connector.s3.bucketNameproperty, for example:connector.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.log file. See S3 bucket restrictions for more information on bucket naming.
-
Add the
connector.s3.bucketRegionproperty 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-1Note
If you use a region other than the US East (N. Virginia) endpoint (previously named US Standard) to create a bucket,
connector.s3.bucketRegionis 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=S3This 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.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 which are incomplete or aborted uploads, before marking them for deletion:
connector.s3.abortIncompleteMultipartUploadDays=1Note
If lifecycle configuration on the bucket is not required, then set the value to
0:connector.s3.abortIncompleteMultipartUploadDays=0See 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.tagNameandconnector.s3.tagValueproperties.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.
-
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.
-
Save the
alfresco-global.propertiesfile.You are now ready to start Alfresco Content Services.