We are performing GET bucket location call with V4 signature generated using "us-east-1" region in the following URL format:
https://s3.amazonaws.com/my-bucket-name?location
Sometimes, it returns the error in following format:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AuthorizationHeaderMalformed</Code>
<Message>The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-1'</Message>
<Region>us-west-1</Region>
<RequestId>A1A1</RequestId>
<HostId>B1B1</HostId>
</Error>
My questions:
- Is the region 'us-west-1' mentioned in "Region" tag the correct location of the bucket?
- Or is it asking us to make GET bucket location call again with new V4 signature generated using this region (us-west-1 in current example)?
- Can we make multiple GET bucket regions calls simultaneously for various buckets in various regions?
Edit (on Aug 25, 2016 IST): Added Que #3 above.
Edit (on Sep 08, 2016 IST): It was a buggy code for multithreading. No issue from S3. The issue is resolved. Let me know how to close the question.
https://s3.amazonaws.com/bucket-name?location
? Thes3.amazonaws.com
endpoint should always require requests to be signed as us-east-1, even when you're querying for the location constraint of a bucket located elsewhere (which does work). If this is for certain what you are doing, tryhttps://s3-external-1.amazonaws.com/bucket-name?location
and see if the response differs. Also, where is the machine located that's sending the request? – Michael - sqlbothttps://s3-us-west-2.amazonaws.com/bucket-name?location
? – Michael - sqlbot