Advanced customization for the S3MultipleBuckets subsystem - Advanced customization for the S3MultipleBuckets subsystem - Alfresco - Alfresco Content Connector for AWS S3 - Alfresco/Alfresco-Content-Connector-for-AWS-S3/6.1/Alfresco-Content-Connector-for-AWS-S3/Configure/Configuring-Content-Connector-for-AWS-S3/Using-multiple-buckets/Advanced-customization-for-the-S3MultipleBuckets-subsystem - 6.1 - 6.1

Alfresco Content Connector for AWS S3

Platform
Alfresco
Product
Alfresco Content Connector for AWS S3
Release
6.1
License
ft:lastPublication
2026-01-23T13:23:45.694000
ft:locale
en-US

These steps describe how to enhance the S3MultipleBuckets subsystem sample by adding specific configuration for each S3 store.

By default, the Common configuration section in s3-mb-contentstore-context.xml defines the client configuration and retry policy shared by all stores. You can duplicate this section in case you need a specific configuration for one of the stores.

  1. Locate the file s3-mb-contentstore-context.xml, for example:
    $CATALINA_HOME/shared/classes/alfresco/extension/subsystems/ContentStore/S3MultipleBuckets/s3-mb-contentstore-context.xml
    
  2. Duplicate the Common configuration section:
    <bean id="s3RetryPolicy"class="com.amazonaws.retry.RetryPolicy">
        <constructor-arg ref="s3RetryCondition"/>
        <constructor-arg>
            <util:constant static-field="com.amazonaws.retry.PredefinedRetryPolicies.DEFAULT_BACKOFF_STRATEGY"/>
        </constructor-arg>
        <constructor-arg value="${connector.s3.maxErrorRetries}"/>
        <constructor-arg value="false" />
    </bean>
            
    <!-- Client configuration options such as proxy settings, user agent string, max retry attempts, etc. -->
    <bean id="s3ClientConfiguration" class="com.amazonaws.ClientConfiguration">
        <!-- Sets the retry policy upon failed requests. -->
        <property name="retryPolicy" ref="s3RetryPolicy"/>
        <!-- Sets whether throttled retries should be used -->
        <property name="useThrottleRetries" value="true"/>
        <property name="requestTimeout" value="${connector.s3.store2.httpRequestTimeout}" />
    </bean>
    					
  3. Add a specific store prefix (e.g. store2.) to the bean names and properties.

    For example:

    <bean id="store2.s3RetryPolicy"class="com.amazonaws.retry.RetryPolicy">
        <constructor-arg ref="s3RetryCondition"/>
        <constructor-arg>
            <util:constant static-field="com.amazonaws.retry.PredefinedRetryPolicies.DEFAULT_BACKOFF_STRATEGY"/>
        </constructor-arg>
        <constructor-arg value="${connector.s3.store2.maxErrorRetries}"/>
        <constructor-arg value="false" />
    </bean>
             
    <!-- Client configuration options such as proxy settings, user agent string, max retry attempts, etc. -->
    <bean id="store2.s3ClientConfiguration" class="com.amazonaws.ClientConfiguration">
        <!-- Sets the retry policy upon failed requests. -->
        <property name="retryPolicy" ref="store2.s3RetryPolicy"/>
        <!-- Sets whether throttled retries should be used -->
        <property name="useThrottleRetries" value="true"/>
        <property name="requestTimeout" value="${connector.s3.store2.httpRequestTimeout}" />
    </bean>
    					
  4. Update the s3ClientConfiguration in store2.s3Adapter.

    For example: <propertyname="clientConfiguration"ref="store2.s3ClientConfiguration"/>