s3 client generating wrong URLs

Bug #979861 reported by Bartlomiej Ogryczak
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
txAWS
New
Undecided
Unassigned

Bug Description

S3Client generates endpoint URLs in format https://s3.amazonaws.com/bucketname/key, however for some buckets (eg. in zone EU-west) this doesn't work. Instead an error is returned

<Error>
<Code>PermanentRedirect</Code>
<Message>
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
</Message>
<RequestId>...</RequestId>
<Bucket>bucketnmae</Bucket>
<HostId>...</HostId>
<Endpoint>bucketname.s3.amazonaws.com</Endpoint>
</Error>

Correct URL format for accessing any bucket is http[s]://bucketname.s3.amazonaws.com/key

Tags: s3
Revision history for this message
Bartlomiej Ogryczak (b-ogryczak) wrote :
Revision history for this message
Tristan Seligmann (mithrandi) wrote :

Note that this doesn't work for buckets with a name that is invalid as a DNS component, so I suspect we need to support both methods of addressing a bucket.

Revision history for this message
Bartlomiej Ogryczak (b-ogryczak) wrote :

Right, it's US based vs. non-US-based buckets. http://docs.amazonwebservices.com/AmazonS3/latest/dev/BucketRestrictions.html

I'm using EU-West region.

Revision history for this message
Bartlomiej Ogryczak (b-ogryczak) wrote :

Or more like US-East vs. any other.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Please note that there is a patch attached to https://bugs.launchpad.net/txaws/+bug/1033324 that Least Authority Enterprises has been using in production (AWS us-east).

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

I created a branch to hold the https://leastauthority.com version of txAWS and here is the patch for this issue from that branch:

http://bazaar.launchpad.net/~zooko/txaws/leastauthority.com/revision/151

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.