Loading

Amazon S3 connector try to access a different region/endpoint to the bucket

Fecha de publicación: Jul 28, 2025
Tarea

GOAL

Prevent the S3 connector access to US-WEST-1 or a region different to the one containing the bucket.

Pasos

If not specified, S3 connector uses the default AWS S3 endpoint. If the bucket is not found in the target region AWS client will redirect the request to the correct region (and endpoint).
To prevent this automatic redirection and hit the correct endpoint it's possible to specify the endpoint using the storageUrl parameter. The complete list of endpoint can be found in AWS documentation page

For example, the next configuration will use the "eu-central-1" endpoint.

<s3:config name="Amazon_S3__Configuration" accessKey="xx" secretKey="xx" storageUrl="https://s3.eu-central-1.amazonaws.com" > 
</s3:config> 

Note that if bucket doesn't exist in the storageUrl endpoint, AWS will not redirect the request to the correct one and an exception will be thrown:

com.amazonaws.1.11.21.shade.services.s3.model.AmazonS3Exception: The bucket is in this region: null.Please use this region to retry the request (Service: Amazon S3; Status Code: 301; Error Code: PermanentRedirect; Request ID: 72B450A35BA8BD8A), S3 Extended Request ID: 5tKtPgqzgsSfG4giJ5SXgrEkvuFq+vVLNsnft5YIcgkIbZvMcF59s1RWNGbh3WAqXu37cOizntg=
	at com.amazonaws.1.11.21.shade.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1401)
	at com.amazonaws.1.11.21.shade.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:945)
	at com.amazonaws.1.11.21.shade.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:723)
	at com.amazonaws.1.11.21.shade.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:475)
Número del artículo de conocimiento

001114609

 
Cargando
Salesforce Help | Article