Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization mechanism not supported. #4

Closed
modeler opened this issue Mar 8, 2019 · 6 comments
Closed

Authorization mechanism not supported. #4

modeler opened this issue Mar 8, 2019 · 6 comments

Comments

@modeler
Copy link

modeler commented Mar 8, 2019

Signed URLs created using this method no longer work as described, the error message returned by S3 is:

The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRequest</Code><Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><RequestId>6E3C22BA95E2D831</RequestId><HostId>GahUHTZ6yXzUhEOl+AtneMlUiv6MgvIMG0n/lyDwv3rwPr/CHxCvuwR7ds3FtZeJ8t1rQOgNUpA=</HostId></Error>

I assume some further tweaking needs to be done, but I haven't found out what yet.

@ravsau
Copy link
Owner

ravsau commented Apr 8, 2019

Hi @modeler If this is regarding this lab presign-url-s3-upload, I just verified the steps and it's working for me.

@ravsau
Copy link
Owner

ravsau commented Apr 8, 2019

This may be the reason why your upload is failing
image

Reference

https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html

@shubhamsre
Copy link
Contributor

You should set signatureVersion: 'v4' in config to use new signature version in aws:
AWS.config.update
({
signatureVersion: 'v4'
});

If you are using boto3 then there will be a different work around. But the error is just because the region doesn't support V2 and V4 must be used.

@ravsau ravsau closed this as completed Apr 12, 2019
@modeler
Copy link
Author

modeler commented Apr 12, 2019

Hi,

Thank you both for following this up. I just tried again and it worked fine, no idea what the problem was on my previous attempt!

@shubhamsre
Copy link
Contributor

shubhamsre commented Apr 12, 2019

Hi,

Thank you both for following this up. I just tried again and it worked fine, no idea what the problem was on my previous attempt!

Your welcome @modeler and Its great to hear that. Anyway just clone the repo again as i made the changes to work only with V4. I am sure it will work just fine.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants