AWS S3 CLI - Could not connect to the endpoint URL

Prabhat picture Prabhat · Nov 3, 2016 · Viewed 127.1k times · Source
$ aws s3 ls

Could not connect to the endpoint URL: "https://s3.us-east-1a.amazonaws.com/"

What could be the problem?

Answer

Frederic Henri picture Frederic Henri · Nov 3, 2016

You probably have something wrong in your default profile for the default region.

Check your file at ~/.aws/config, you have something like

[default]
region=us-east-1a
...

Fix the region to region=us-east-1 and then the command will work correctly