Most errors on AWS are explicit and self explanatory, but once in a while you run into something that tells you something went wrong, but not how to fix it.
When setting up an S3 bucket to serve a static website, I got this error being returned as 301s for referenced files:
<Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message>
If you click an object in a bucket and click the overview tab, you can get a URL direct to the object, for example:
To load a static site from S3 though, you need to use a URL referencing the bucket in the server name, so instead of this:
You should use this:
(I’m currently working on a React app as a Sudoku Solver – more on this later)