aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.32k stars 4.07k forks source link

A client error (SignatureDoesNotMatch) occurred when calling the CreateBucket operation: The request signature we calculated does not match the signature you provided. Check your key and signing method. #2665

Closed dschinkel closed 7 years ago

dschinkel commented 7 years ago

I have been able to run my s3 commands just fine. But today when I try from my local PC (OSX, command-line cli calls) as I always have when testing, I get:

aws s3api create-bucket --bucket our-bucket-name --region us-west-2 --create-bucket-configuration LocationConstraint=us-west-22

and it is bombing today out of the blue with A client error (SignatureDoesNotMatch) occurred when calling the CreateBucket operation: The request signature we calculated does not match the signature you provided. Check your key and signing method.

what could cause this all of a sudden? I rebuilt a previous Travis build using some AWS credentials I had addd as enviornment variables in Travis and that build still works with the asw credentials I specified, but I've not had to specify my AWS credentials locally for aws cli calls or if I did, then I don't remember but regardless this was working fine yesterday.

Here's another call that was working just fine up till now

aws s3api head-bucket --bucket mayfield-gizmo-react-web-admin-wa-19

A client error (403) occurred when calling the HeadBucket operation: Forbidden
So why was I able to make calls fine without specifying credentials locally, but now it's complaining all of a sudden?

So why was I able to make calls fine without specifying credentials locally, but now it's complaining all of a sudden?

dschinkel commented 7 years ago

I don't know what it was but I reset my credentials locally and it's working. No idea why the hell it would just stop using the credentials that are already set locally which I guess I did do at some point:

screen shot 2017-06-14 at 12 47 19 pm
Genaker commented 4 years ago

This error occurred when you AWS credential set using environment variables And the key has special characters in my case "/" Related issue: https://github.com/aws/aws-cli/issues/602

nicovigil1 commented 4 years ago

^-- This solved my problem

mckadesorensen commented 3 years ago

Thank you, worked like a charm!

gomezjesus commented 3 years ago

I got a special character too a "+" plus symbol. Generated other key without special charactes and it is working again! Thanks

continuum-dev-chaudhary commented 3 years ago

Worked for me :D TRY THIS: Just had this happening to me and was a result of my system time being off by too much even though it did not report that. Ran ntpdate against pool.ntp.org and fixed this problem for me.

negeek commented 2 years ago

show me how you did it

elixapesa commented 2 years ago

My AWS credentials are from STS assume role. How do I make sure it does not generate a special character?

DPubliweb commented 1 year ago

This error occurred when you AWS credential set using environment variables And the key has special characters in my case "/" Related issue: #602

Well done

seekatekode commented 1 year ago

I ran into this issue a few weeks ago and finally found this post! Resetting the AWS SECRET ACCESS KEY helped with this issue and I am now able to successfully run ./bin/db/update_cognito_user_ids THANK YOU!🙏🏾

l-alfaro commented 1 year ago

Worked for me :D TRY THIS: Just had this happening to me and was a result of my system time being off by too much even though it did not report that. Ran ntpdate against pool.ntp.org and fixed this problem for me.

sudo ntpdate pool.ntp.org