9

I've just set up a new S3 account and want to move my assets folders there. But when I try to upload a file, I get the following error:

S3::getObjectInfo(mikkelbang, shallowtree.png): [400] Unexpected HTTP status

And the same goes for when I try to update the Assets index:

S3::getBucket(): [InvalidRequest] The authorization mechanism you have provided is not supported.
Please use AWS4-HMAC-SHA256.

I've never used S3 before, so it might be something I need to set up there. But I couldn't find any documentation on setting up S3 with Craft...

1 Answer 1

12

There are a few regions that support only S3's v4 of signing requests without the possibility of falling back to v2. The S3 library that Craft 2 uses only supports S3 v2. Check this table for reference - if it says "Version 4 only" in the last column then that region can't be used in Craft 2.

We're not switching out that library in Craft 2.x, but it won't be a problem in Craft 3, so currently your best bet is to move your bucket to a different region, which also supports S3 v2 signing of requests (any other one, really).

9
  • Haha. Figures I managed to pick the only region that doesn't work. Changed to another region and it works now. Thanks.
    – peirix
    Commented Dec 31, 2014 at 15:25
  • @andris-sevcenko more than a year later and I still run into this problem. When will Frankfurt be supported?
    – Florian
    Commented Mar 15, 2016 at 15:33
  • 4
    Note, that this is also a problem with the new Ohio region. Commented Nov 30, 2016 at 18:04
  • 1
    I can confirm this is also a problem with the London region. Ireland is okay. Commented Mar 7, 2017 at 13:10
  • 1
    It would be helpful if this was mentioned in the Craft docs. Including some specific error logging (or validation when adding the assets config) would be even better still.
    – Dom Stubbs
    Commented Jul 19, 2017 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.