qoobaa / s3

Library for accessing S3 objects and buckets, supports EU and US buckets
MIT License
258 stars 112 forks source link

Interacting with a bucket on s3-eu-central-1 (frankfurt) fails #102

Open lloeki opened 9 years ago

lloeki commented 9 years ago

Operations such as bucket.objects.first fail.

First, it is now required to operate directly against a given endpoint: HOST cannot be a single constant anymore:

/Users/lloeki/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/s3-0.3.22/lib/s3/connection.rb:216:in `handle_response': The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. (S3::Error::PermanentRedirect)

Indeed, hacking it with S3::HOST = "s3-eu-central-1.amazonaws.com" helps proceeding to the next step.

Then, this new endpoint makes v4 signatures mandatory:

/Users/lloeki/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/s3-0.3.22/lib/s3/connection.rb:216:in `handle_response': The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. (S3::Error::ResponseError)

Unfortunately this does not seem to be implemented.

lloeki commented 9 years ago

I think here is the relevant documentation.

qoobaa commented 9 years ago

I created the gem in 2009 to allow connecting to Europe location in Ireland. There was no Frankfurt location back then, so the gem is definitely not prepared for that. Feel free to create a PR with support for v4 signatures and Frankfurt endpoint.

lloeki commented 9 years ago

I needed to make a quick script to solve some outstanding issue, so I fell back to use python's boto in the meantime.

vnazarenko commented 8 years ago

Still no support for v4?

mr-deamon commented 8 years ago

+1

RdNetwork commented 7 years ago

I second this. Would be very useful. Is there a fork or PR somewhere that could be used when facing this bug?