Karl Taylor
Karl Taylor

Reputation: 5279

Amazon S3 Error: The specified bucket exists in another region

I'm just setting up a simple splash page basic static HTML and I decided to put it on S3.

my bucket name is called the same as my domain

www.example.com.s3-website.eu-west-2.amazonaws.com/

And then I've got a CNAME set to the same thing.

the only problem is i'm getting a 400 error from Amazon S3

400 Bad Request

  Code: IncorrectEndpoint
  Message: The specified bucket exists in another region. Please direct 
  requests to the specified endpoint.

I've checked and my bucket is definitely EU West and this is the endpoint it's given me when serving a static site.

Upvotes: 8

Views: 6444

Answers (2)

Karl Taylor
Karl Taylor

Reputation: 5279

I didn't manage to solve the wrong region problem, however, I created a cloudfront distrubution and set a CNAME to that instead.

Upvotes: 3

jens walter
jens walter

Reputation: 14029

You can check your bucket location through the following command.

aws s3api get-bucket-location --bucket {bucketname}

Could it be, that your bucket is located in eu-west-1 instead of eu-west-2?

Upvotes: 2

Related Questions