appoxy / aws

Amazon Web Services (AWS) Ruby Gem

Home Page:https://rubygems.org/gems/aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

S3 bucket creation failed on s3-eu-west-1.amazonaws.com

ismetozalp opened this issue · comments

Hi,
There is bug like this seems to fixed #40 ,
but when i try to create bucket in eu-west-1

AWS::S3::DEFAULT_HOST.replace "s3-eu-west-1.amazonaws.com"
AWS::S3::Bucket.create("test", :access => :private)

I got this error

....../aws-s3-0.6.3/lib/aws/s3/error.rb:38:in raise': The unspecified location constraint is incompatible for the region specific endpoint this request was sent to. (AWS::S3::IllegalLocationConstraintException) from /home/ismet/.rvm/gems/ruby-1.9.3-p392/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:72:inrequest'
from /home/ismet/.rvm/gems/ruby-1.9.3-p392/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:88:in put' from /home/ismet/.rvm/gems/ruby-1.9.3-p392/gems/aws-s3-0.6.3/lib/aws/s3/bucket.rb:79:increate'

Hi @ismetozalp , I don't think you need to specify the location constraint which I believe is just :location => "EU" in the options, eg:

AWS::S3::Bucket.create("test", :access => :private, :location=>"EU")