-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
SignatureDoesNotMatch error #602
Comments
EDIT: If you are running into this issue, we'd appreciate your help in troubleshooting. I'm updating this comment for better visibility on troubleshooting steps. TroubleshootingThe first step for troubleshooting this is to determine whether or not the issue is with the credentials themselves or with the CLI. To test this, try using these credentials in other AWS SDKs (javascript, ruby, java, etc). To help with this, I've created a test script that uses the AWS SDK for python and javascript which is available here: https://github.com/jamesls/aws-creds-test . After cloning, just run
For people running into this issue, please run the test script and share the output. This should give us better insight into where this issue is occurring:
Thanks in advance for anyone that can help us troubleshoot this issue. Let me know if there's any questions. |
This is how it looks like:
|
Any updates on this issue? I'm also encountering this error and my credentials file hasn't changed. |
I have a similar issue. Jenkins s3 plugin is able to put an object using my credentials, but the aws-cli is giving me the errors below.
|
I am running into the same issue. If I make up a secret it gives me a different (AuthFailure) error.
This is pretty much stopping me completely. I can do some things with the ec2-blah-stuff utilities by specifying x509 certs but the help says that's deprecated so I don't want to depend on it. Any help troubleshooting or what ever would really be appreciated. |
The first step would be to ensure that your access/secret keys are actually valid. A few things to try:
|
They do not work with other tools (ec2-describe-instance for instance). I think I have the appropriate rights since using the certs works. To make sure it's not a workstation thing I built an Amazon Linux instance and I'm using the awscli verison that comes with it but getting the same message. |
Also an issue for me. I'm using it in a docker container, built with the same Dockerfile. |
It looks like the issue is with the credentials themselves. I've double checked this, and I'm not able to repro this issue. Double check the credentials on the security credentials page. If someone can provide an exact set of steps that demonstrate the issue, I'd be happy to take another look. |
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. |
If you are getting this error when cred are setup using env variable, try sudo |
If you are in a virtual machine make sure your host os time matches the guest os time. If this is not the case you will get into the error you described. |
A very similar error occurs for me with good credentials, whilst listing a bucket which has a lot of keys in it. Here's the error:
Here's my output from
Note that these credentials work fine with other |
I've been getting this issue, and if I just sleep my script for a second and try again then it goes through. It's almost like it's getting throttled and returning the wrong error or something. |
I can report this issue too. Trying to upload a 11 GB file using aws cp foo s3://mybucket/foo/bar I get various errors like:
and
I've checked that my system time is correct. I also noticed considerable slowness (on the level of http requests timing out) on the same system while uploading, so this being a throttling issue does sound reasonable. It also works fine to upload small files with the same credentials, and using the web console from the same machine, so this does appear to be a aws-cli problem. |
This happened to me with too with aws-cli 1.5.5, updating aws-cli to 1.6.2 solved it. |
Happens to me with 1.6.2 |
This happened to me today. This is new to me. Been using awl-cli for a few months no problem and no change to the credentials AFAIK. $ aws configure --profile ye list
Name Value Type Location
---- ----- ---- --------
profile ye manual --profile
access_key ****************ERMQ shared-credentials-file
secret_key ****************E8Id shared-credentials-file
region us-east-1 config-file ~/.aws/config |
I believe this issue is now fixed via boto/botocore#388, and will be available in the next AWS CLI release. |
@jamesls confirmed fixed on awscli version |
I am getting this issue on a fresh ubuntu system.
Installed aws-cli via pip
Any ideas on how to fix it? |
My solution was to sleep for a few seconds and then try it again, but it On Tue, Dec 2, 2014 at 3:38 AM, Mark Wolfe [email protected] wrote:
|
@wolfeidau and yeah I spoke too soon. The locally pip installed awscli is giving the SignatureDoesNotMatch errors again. Yikes! A client error (SignatureDoesNotMatch) occurred when calling the DeregisterInstancesFromLoadBalancer operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
The Canonical String for this request should have been
'POST
/
host:elasticloadbalancing.us-east-1.amazonaws.com
user-agent:aws-cli/1.6.5 Python/2.7.8 Darwin/13.4.0
x-amz-date:20141203T015747Z
host;user-agent;x-amz-date
1d9dafbf4bfa9b1225d91bdbf99d8645503484d174b9094e4c3af637e6664b5b'
The String-to-Sign should have been
'AWS4-HMAC-SHA256
20141203T015747Z
20141203/us-east-1/elasticloadbalancing/aws4_request
5a56d12a4920502f4124e37a92aad475c36edda93d9865871e6a4fe1e49045c3'
|
Does this issue happen only when a request is retried? Or does this happen everytime you run the deregister-instances-from-load-balancer command? |
@jamesls it happens everytime now :( |
I know this issue is closed but wanted to share that you can see this error when running in a VM which hibernates. In such cases, the system clock doesn't consistently catch up if you're using Ubuntu. Just update the time to fix (i.e. sudo ntpdate -s time.nist.gov). |
hello, is there any final fix on this? |
+1 Using version 1.7.8 of the CLI I was seeing the same SignatureDoesNotMatch error when trying the following: And getting an AuthFailure for this: After deleting my keys and trying new ones, both commands work. This is the old secret access key that may have been the cause of my problems, note the percent, plus and forward slash characters: H2J7/oT3Fib15SwFVB1s3EnTCmg+SC7wF7qoP+dw% |
👍 @gsterndale. My access key with |
I'm in a virtual machine making the host Time&Region similar to the guest Time&Region solves the problem . |
Just wanted to chime in that this hit me today as well on a newly created key - and after lots of frustration, landed here and saw mention of a |
I can not believe this issue's opened in 2014 and still there is no fix for it, this bug forced me to make a new set of AWS credential for myself, I even tried to encode the '/' but it didn't work :( |
Eliminating the credential with the "/" fixed the issue for me. Thanks to everyone for pointing this out. |
Just hit this in 2020 now. Secret key has a '+'. aws-cli — developed by aws project — fails with valid aws keys... for 6 years? |
Same problem in 2020 January. Secret key has a "/" slash character. I generated a new credential set, using the AWS IAM console, and ensured that the secret key was all alphanumeric, no "/" no "+" and so on. I replaced my old secret key with the new secret key, in my ~/.aws/credentials file, then retried. This solved it. |
Same issue here on 2020. But I can not remove none alphanumeric characters as they are part of my credentials it self, and I'm not in control of that |
I first ran into timeout issues and after updating my awscli ran into this issue. You thought 6 years is enough to make it work... |
am also having this deploying Vue.js app through gitlab to AWS S3 bucket can someone tell me what to do |
I did not have any non-alphanumeric chars, but working with profiled did not work, for a single profile. I regenerated the credentials using the console and the new ones just worked. |
Getting such errors as well today, and regenerating the credentials without special characters ('+' or '/') works for me. |
I still have the same issue , but it happens suddenly, I work with Get and Put operations and one works, the other doesn't. and yes my secret key doesn't contain any special characters. any help? I first call getIntent (amazon lex models API) to retrieve the intents checksum, then call putIntent to update that that intent. Get method works (Not all the time) but put method appears the same issue of signature, while if I removed Get method API from code, Put method works 2 times out of three. |
I had this issue, I suggest you to generate new keys aws configureAWS Access Key ID [****************QD5E]: AWS_ACCESS_KEY_ID |
Hi ! I am getting this same issue when using pre-signed URL returned to my client The error is on and off, so I think it is related to what is said here about special keys in the credentials, but since I am using credentials generated in the server - I cannot change them ! Any way to take care of this in the code ? parse the specials keys somehow ? |
@maya-harel you can change the credentials from IAM -> users select user you have created and re-generate the secret key security credentials tab. also timing in code is really fatal, for each request you make in back-end, get the current time to use it in header to generate the signature. |
As an aside, there have been a lot of blind "regenerate your IAM credentials" suggestions to users who've explicitly said it's not an option for them. This is not helpful to the users, and distracts from the fact that this is a known bug that continues to affect aws-cli users attempting to use valid IAM credentials. |
Running into this as well. My keys are completely alpha-numeric, no special characters. The keys work from the shell, however when used via Jenkins in a Makefile target, this error occurs. Not sure what is happening here. |
My secret key has both
All of these result in the I currently cannot regenerate the key. What I don't understand is that I can use the S3 Protocol in Cyberduck (https://cyberduck.io/) and it works as expected. How could that be? |
This has to be one of the most frustrating bugs I have encountered and it's nuts that it hasn't been fixed. Getting a cred without a "+" worked for me in CircleCI. |
Is it still crashing? facing the same problem, wow i cannot be possible... |
Yes, it is frustrating. My secret key that had a |
I had this issue on package installed version of awscli on Ubuntu 16.04. I fixed it by installing awscli as a python pip package. |
Issue Encountered
$ python SetupAWS.py list_things Root Cause Analysis
Resolution
$ python SetupAWS.py list_things |
This issue has been open for six years, and I thank you for your patience, persistence, and the information you have provided. A few underlying causes have been identified through your comments (#602 (comment)) and compiled into the Command Line User Guide Troubleshooting Errors chapter. These causes include clock skew and some operating systems mishandling keys with special characters. I attempted to reproduce this using a number of different environments. I used Ubuntu 16.04, Ubuntu 18.04, and Amazon Linux 2, with Python 3.6.8 and 3.8.3. While many commenters used Python 2, I did not attempt to reproduce since it is no longer supported. I used the latest v1 aws-cli (1.18.80 at the time of writing) as well as an older version (1.11.78) referenced in this issue. I used the script provided (#602 (comment)) by @jamesls that creates new credential pairs until it encounters one with special characters and let them run for up to an hour each. I did not have any occurrences of a The large number of comments makes it difficult for new users coming to this issue to find requests from our developer team for troubleshooting suggestions. To assist our team and the community in determining a cause of this error, I am closing this issue. Due to the variation of user environments where this error occurs, please file a separate issue instead of commenting on an existing one. |
I keep on getting a A client error (SignatureDoesNotMatch) occurred when calling the ListUsers operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
I set the environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION.
The text was updated successfully, but these errors were encountered: