aws/aws-cli — pull request #968 by jamesls (2014-10-24 19:50:29+00:00)
Title: Improve error message for sigv4 and PermanentRedirect errors

The error message now includes a note on specifying the
correct region:
```
$ aws s3api list-objects --bucket wrong.region.bucket

A client error (PermanentRedirect) occurred when calling the ListObjects operation:

The bucket you are attempting to access must be addressed using the specified
endpoint. Please send all future requests to this endpoint:
wrong.region.bucket.s3-ap-southeast-2.amazonaws.com
You can fix this issue by explicity providing the correct region location
using the --region argument, the AWS_DEFAULT_REGION environment variable, or
the region variable in the AWS CLI configuration file. You can get the
bucket's location by running "aws s3api get-bucket-location --bucket BUCKET".
```

Same thing when you try to access a bucket in eu-central-1.

cc @danielgtaylor @kyleknap