10

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...

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

| improve this answer | |
  • Haha. Figures I managed to pick the only region that doesn't work. Changed to another region and it works now. Thanks. – peirix Dec 31 '14 at 15:25
  • @andris-sevcenko more than a year later and I still run into this problem. When will Frankfurt be supported? – Florian Mar 15 '16 at 15:33
  • 4
    Note, that this is also a problem with the new Ohio region. – Trevor Davis Nov 30 '16 at 18:04
  • 1
    I can confirm this is also a problem with the London region. Ireland is okay. – Clive Portman Mar 7 '17 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 Jul 19 '17 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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