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.
You can set up a S3 Multi-Region Access Point in three simple steps. First, you will receive an automatically generated S3 Multi-Region Access Point endpoint name, to which you can connect your clients. Second, you will select existing or create new S3 buckets that you would like to route requests between.
Amazon S3 supports global buckets, which means that each bucket name must be unique across all AWS accounts in all the AWS Regions within a partition. A partition is a grouping of Regions.
But when we create S3 in AWS console in "Global" it says "S3 does not require a region selection" because it shows all the buckets in all the regions as it is the user interface and this is the reason why you can't create the bucket with same names as it may lead to conflicts between addresses.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With