Wednesday, 21 March 2012

Specifying the endpoint when accessing Amazon AWS S3 bucket

"The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint."

I got this error today when using the aws-s3 Gem. Perhaps it works out-of-the-box for those in America, but I chose Ireland to store my images, and the solution to the above was this line:
AWS::S3::DEFAULT_HOST.replace "s3-eu-west-1.amazonaws.com" 

2 comments:

  1. Where exactly was this line added??

    ReplyDelete
  2. Just before you do anything with AWS::S3::S3Object

    ReplyDelete

Comments are moderated, so you'll have to wait a little bit before they appear!