Annoying but this:
aws ec2 describe-availability-zones --region eu-west2
Could not connect to the endpoint URL: "https://ec2.eu-west2.amazonaws.com/"
The reason is simple – there’s a typo in the Region.
It should be:
aws ec2 describe-availability-zones --region eu-west-2
Would be nice if the AWS CLI gave a better error message! E.g. like there’s no such Region.
More here: https://stackoverflow.com/questions/40409683/aws-s3-cli-could-not-connect-to-the-endpoint-url