$ aws s3 ls
Could not connect to the endpoint URL: \"https://s3.us-east-1a.amazonaws.com/\"
What could be the problem?
You should specify the region in your CLI script, rather than rely on default region specified using aws configure (as the current most popular answer asserts). Another answer alluded to that, but the syntax is wrong if you're using CLI via AWS Tools for Powershell.
This example forces region to us-west-2 (Northern California), PowerShell syntax:
aws s3 ls --region us-west-2