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

AmazonS3Exception Status Code: 400, Please use AWS4-HMAC-SHA256 #71

Open
jarppe opened this issue Dec 17, 2014 · 4 comments
Open

AmazonS3Exception Status Code: 400, Please use AWS4-HMAC-SHA256 #71

jarppe opened this issue Dec 17, 2014 · 4 comments

Comments

@jarppe
Copy link

jarppe commented Dec 17, 2014

I'm getting com.amazonaws.services.s3.model.AmazonS3Exception exception with this description:

Status Code: 400, AWS Service: Amazon S3, AWS Request ID: 2A700E5BB5693E09, AWS Error Code: InvalidRequest, AWS Error Message: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

The only operation that I can execute successfully is:

(s3/list-buckets cred)

That works, but only if I don't specify :endpoint in by cred's. If I add :endpoint "s3-eu-central-1.amazonaws.com" to my cred's, then the list-buckets gives that same exception.

Any ideas what could be wrong?

@sw1nn
Copy link
Collaborator

sw1nn commented Dec 20, 2014

In short, clj-aws-s3 doesn't support the v4 authentication scheme, because we're on quite an old version of the AWS SDK.

s3 regions created after 30 Jan 2014 use this v4 scheme.

Since frankfurt (eu-central-1) is a new region you have the problem there, but not in the old regions which still support the older ways.

details here: http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html

So an upgrade to the AWS SDK should fix this problem, but In my view we could do with a bit of an overhaul of the credentials / Authentication handling. We need to support CredentialsProviders in addition to the current Credentials suppport.

Related issues are #69 , #68

@dmac
Copy link

dmac commented Aug 20, 2015

Do you have plans to upgrade the AWS SDK to support V4 authentication? We recently expanded to the Frankfurt datacenter and would like to continue using this library, but it seems unusable for new regions until this functionality is added.

@SevereOverfl0w
Copy link

Also seeing this!

@poojasaxena
Copy link

also seeing this with both Frankfurt and ireland

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

5 participants