appoxy / aws

Amazon Web Services (AWS) Ruby Gem
https://rubygems.org/gems/aws
236 stars 87 forks source link

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

Open ismetozalp opened 11 years ago

ismetozalp commented 11 years ago

Hi, There is bug like this seems to fixed https://github.com/appoxy/aws/pull/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'

treeder commented 11 years ago

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")