Skip to content

Instantly share code, notes, and snippets.

@dctanner
Created August 6, 2008 01:10
Show Gist options
  • Save dctanner/4145 to your computer and use it in GitHub Desktop.
Save dctanner/4145 to your computer and use it in GitHub Desktop.
S3 buckets in Europe
Object operations (i.e. upload file) should be made to `mybucket.s3.amazonaws.com/myobject` and *not* `s3.amazonaws.com/mybucket/myobject` (as `s3.amazonaws.com` points to the US data center)
Annoyingly the signature on the request S3 expects needs a path which includes the bucket name! So when using your own domain as your bucket name (e.g. videos.mysite.com), even though the path (url excluding host and port) to PUT and object is going to be `/myobject`, the CanonicalizedResource part of the request signature requires a path string of `/videos.mysite.com/myobject`. See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?RESTAuthentication.html for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment