Skip to main content

Command Palette

Search for a command to run...

AWS Error PermanentRedirect

Published
•1 min read•View as Markdown
A

developer

So, if you want to upload a file with AWS S3 and encounter an error like:

PermanentRedirect: The bucket you are attempting to access must
 be addressed using the specified endpoint.
 Please send all future requests to this endpoint.

You should recheck your region setting. In most cases, you may have specified the incorrect region.

javascriptCopy codeexport const createS3Client = () => {
  const REGION = "us-west-2"; // Is the incorrect region; perhaps it should be us-west-1?
  return new S3Client({ region: REGION });
};

More from this blog

Yet another blog

9 posts

Blog about AWS, Cloud, and JavaScript.