AWS is moving away from Version2 of signing slowly. This module needs to be updated to support Version4 method of signing requests.

http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html

Comments

perignon’s picture

Issue tags: +AWS, +s3
perignon’s picture

Also explore giving the cURL operations a work around for shared hosting environments with safe_mode or open_basedir set #2379343: Amazon S3 error: Cannot set it up

Anonymous’s picture

Any thoughts about using the AWS SDK for all S3 related stuff? I think that would probably make a lot of the stuff easier, as it already supports all the signing functionalities.

perignon’s picture

The thought has crossed my mind to save me work. But since the only thing I need is the V4 signing and we only work with S3 that requires the V4 signing (Cloudfront is still V2), it is probably best to just implement the V4 signing rather than loading the AWS SDK as it has so much more than we need.

Yeah this makes more work but it's the more optimal solution from a code base perspective. Also AWS SDK or not I still have to write code to update to V4 because Storage API module so far has never stored the region of a bucket. Till signing V4 you never needed to know the region of a bucket. So I have to implement a way to store the bucket names and write a hook_update_N to run through the buckets and gather the regions from the AWS API for bucket locations.

adrientoulousain’s picture

Hello,

I cannot upload images on S3 anymore since few days. Nothing changed on my conf.
Do you think it might be related to this?

/en/system/storage/serve/7099/W15-sun-compressor.jpg" failed (2: No such file or directory),

I don't have any clue about what is going wrong except some related to S3 and upload rights.

Your opinion is welcomed.

Cheers!

perignon’s picture

No this feature issue would not affect your current setup. This only affects the new region in Frankfurt.

perignon’s picture

Status: Active » Postponed

I wanted to update this issue to give some reasons why I have not moved out on this issue.

Frankfurt is the only region in S3 that forces V4 and up until recently Frankfurt has been completely useless from a web perspective. Until March 2015, you were unable to use Cloudfront with Frankfurt buckets because of the v4 signing. Cloudfront actually could not communicate with storage at Frankfurt - quite amazing this made it through to production by Amazon Web Services! You can view this thread for details: https://forums.aws.amazon.com/thread.jspa?threadID=164372

As of right now Frankfurt is the only region that requires V4 signing. Additionally Cloudfront Signed URLs use the old signing method and will never use V4 signing as it is currently implemented (V4 requires bucket name). So the motivation to update to V4 signing is very small at the moment. My suggestion is basically to not use Frankfurt. If you are wanting to use storage in Europe I recommend to use Ireland instead.

I am going to postpone this issue till AWS gets us a better path forward.