$ aws s3 ls
Could not connect to the endpoint URL: \"https://s3.us-east-1a.amazonaws.com/\"
What could be the problem?
Some AWS services are just available in specific regions that do not match your actual region. If this is the case you can override the standard setting by adding the region to your actual cli command.
This might be a handy solution for people that do not want to change their default region in the config file. IF your general config file is not set: Please check the suggestions above.
In this example the region is forced to eu-west-1 (e.g. Ireland):
aws s3 ls --region=eu-west-1
Tested and used with aws workmail to delete users:
aws workmail delete-user --region=eu-west-1 --organization-id [org-id] --user-id [user-id]
I derived the idea from this thread and it works perfect for me - so I wanted to share it. Hope it helps!