Cross Region S3 bucket policy

amazon ec2amazon s3amazon-web-services

I would like to allow EC2 servers based in us-east-1 to read content from a bucket in us-west-2.

Every time I try I get a "The Bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint"

Is it actually possible to allow such thing, or are s3 buckets locked up to one region?

Best Answer

All buckets are reachable by using the s3.amazonaws.com endpoint. When you use this endpoint, if the bucket is in a non-Standard US region, then you will be redirected to the correct endpoint. This is the only region/endpoint where this trick works.

If the bucket is in the Standard US region, then you must use the s3.amazonaws.com endpoint. None of the other regional endpoints will work.

If you use the correct endpoint for your bucket, you can access the bucket from any region.

Please see http://docs.amazonwebservices.com/general/latest/gr/rande.html#s3_region for full S3 Region explainations.

Related Topic