-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: 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 #86
Comments
Can you provide more information about the intermittent failures? It's hard to reproduce this specific issue. If you can reproduce this and print the results of
and
That would be helpful. For example: ec2.client.copyImage(params, function (err, data) {
if (err) {
console.log("Got error:", err.message);
console.log("Request:");
console.log(this.request.httpRequest);
console.log("Response:");
console.log(this.httpResponse);
}
// ...
}); |
|
It looks like the request is being sent to the us-east-1 endpoint, which from your description is not what you are trying to do. Are you providing the correct region to either the global config or EC2 object? If so, perhaps this is an issue only on retries, which could explain the "randomness". Adding a |
I'm getting this error (SignatureDoesNotMatch) with s3 getBucketTagging using v0.9.8-pre.9 installed via npm.
output:
Using the same s3 client, other operations (at least listBuckets) do work. Any help would be appreciated. I'm trying to set up cost allocation billing and I want to add a standard set of tags to all our assets and doing so by hand would be ... tedious :) |
Closed by #107 |
@pilani - It's been a long while since you posted this question, but, I ran into a similar issue. Essentially, the library I was using to generate the Erin CC @lsegal |
In case this helps anyone: I was getting this same signature failure, but the mistake I was making was including an extra HTTPS header (Content-type) which is apparently used to calculate the signature. Frustrating to track down, for sure, but ultimately my fault. |
I fought with this error for 2 days, until I generated a new set of keys for my account, after which everything worked magically. Note that my old keys were very old (from 2006). A nice error message of |
i try to create bucket var http = require('http') var isoDate =new Date(); callback = function(response) { this return SignatureDoesNotMatch The request signature we calculated does not match the signature you provided. Check your AWS secret access key and signing method.erka/
where is problem? anyone can help? |
@erdogankaya Please take a look at our getting started guide for information on how to configure and use the SDK: |
@chrisradek |
I am having the same issue, but it looks like in the GET (I am trying to retrieve the file) Problem accessing S3. Status 403, code SignatureDoesNotMatch, message 'SignatureDoesNotMatch' What can I do? |
Hi @filipegmiranda |
Hi @LiuJoyceC I am using play-s3 - it is a Scala Library that is suppose to work fine with Play Framework. Here is my complete stack:
I am trying to retrieve a file from my Bucket, my credentials are fine. And yes, I am providing the region, which is the correct one: Here are my properties in application.conf: aws.accessKeyId="AAAA" // Not the real one I have just posted a question with all of this information also in StackOverFlow: My next step is to give up on this library, which appear to be really nice and try to do with the Java SDK from Amazon directly. Take a look: https://github.com/Kaliber/play-s3/ |
Hi @filipegmiranda |
Hi @LiuJoyceC I am using v4, I actually don't know which version of the SDK, since I am using using play-s3, I don't think it even uses SDK behind the scenes. :) https://github.com/Kaliber/play-s3 I will try to use the official AWS client |
Regenerating keys worked for me. |
Yes guys I tested this 3 times now and the solution is to regenerate the secret_key. |
Hi, I have related issue. I'm working with device farm and uploading my app and tests there using aws-sdk npm (v2.6.4).
So after I call devicefarm.createUpload(options, callback) I receive a response json with upload info and pre-signed s3 upload url.
Then I'm trying to perform PUT request to actually upload the file and getting this SignatureDoesNotMatch response.
and obtain another pre-signed url then my curl PUT request is successful. So I assume there is some problem with signing url inside sdk. |
The request signature we calculated does not match the signature you provided. Check your key and signing method getting this error on ubuntu os , but not on mac os. Why? |
I'm facing exactly the same situation as @rishaselfing has just described. Any thoughts on it? |
I got it working after I specified in the header of my request the "content-type": "application/octet-stream" |
i changed the header of my request the "content-type": "application/x-www-form-urlencoded" then it works |
I had the same error and my simple correction was that I was using heroku which was an https and I was calling the non-secure http. Added the 's' and mine worked. |
I had to simply reset my credentials locally, not sure why, strange. Everything had been working fine for a week. http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html what's weird is when I did the command to configure aws, it showed that I did have a key and secret already (same one I've always been using) but for some reason it it was throwing up today and resetting it worked. |
Generating new keys for my account got me past this issue. |
I got this same issue. What ended up being the cause is that I was accidentally sending a Content-Length of -1. Once I sent the correct Content-Length, it worked great. |
I got the same issue, the issue was there was white-space at the end of the AWS key, which was ignored by VMs, but when i migrating to container, it was considering the white-space. This was really a stupid mistake from my side. Hope it will help someone |
Thanks @Deepak275 i think i was getting this error because the key was not being set properly. |
In my case, it was because I did not have 'bucket' set, i.e.
|
I have the same problem when I deploy to my Kubernetes cluster. But everything works fine when using a ubuntu vm or local (macOS). No white-space at the end of the AWS key. |
If you are using correct and working AWS Access Key but wrong AWS Secret Key you will get this error, double check your keys. |
II ran into the same issue. I was using an IAM user with an old access key that didn't have S3FullAccess in the group permissions. Once I added the correct permissions and created a new access key it worked! Hopefully that fixes it! |
I got this error with a secret key that contained a slash |
Pretty annoying bug to track down thank goodness for this Git |
To clarify this, is there a bug in the library where when the secret key contains a / then the presigned urls do not work? |
Lots of scenarios producing the same error I see... In my case having a / made no difference. I had to add a profile to .aws/credentials and add --profile to the command line. |
I cannot for the life of me figure this one out. My network request details:
|
I ran into this, in a yml-based CI environment. It was due to a "/" in the secret key value. |
I had the same exception. Creating a new key didn't resolve it. My error was accidentally using "mybucket/myfolder" as the bucket, instead of using myfolder as part of the key.
|
I had same issue. |
I'm getting this error with the go sdk. Not sure why, but thinking I may just work around it by managing the file transfers to S3 myself. |
I seem to have a "/" in my secret as well. Wonder if that's my problem? |
I am literally stuck in this error for a few days now. I've tried lots of things like content-length, content-type, etc and nothing works. I am working with aws api gateway and GET request works fine. However, whenever I try sending POST and PUT requests, that 403 Invalid Signature Exception arose. Could anyone figure out what is the problem here? |
I had accidentally generated an upload url and was trying to use it as a download url. After I changed that, it worked for me. |
with aws sdk v2 for php :D |
I had this problem. For me the fix was to add the const s3 = new AWS.S3({
accessKeyId: config.awsKey,
secretAccessKey: config.awsSecret,
region: config.awsRegion,
signatureVersion: 'v4',
}); |
I have a similar version to @BabyYawLwi, I use the JS API method and the same credentials to generate GET and PUT links. GET works, but PUT doesn't. So it's not a problem of a typo or slash in credentials, should not be a problem of headers... Tried most of the solutions in this thread and nothing worked so far. |
Changing access keys worked for me. |
I was inserting metadata with symbols like "'" and it was returning this error... check your strings! |
I guess the real problem is "/" in the AWS_SECRET_ACCESS_KEY and heroku environment variable is bad at parsing special characters like "/". I generated a new key for the user which does not have "/" and it worked for me. It worked in my third try when I was lucky to get a secret without "/". I cannot see any other reason in my case. |
this solved my problem |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
I am using aws-sdk for node.js and making an API call to copyImage method using EC2 client from Singapore region to Tokyo.
I have a about 26 AMIs that I need to copy so I have written a program and am initiating the copy process parallely for all.
while copying i am getting this error" SignatureDoesNotMatch: 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" for some AMI's.
Suppose i run my program 3 times then its not necessary that this error will come for same AMI(source region) every run.
Its coming randomly for some Images and for some its succeeding.
Please revert back on this issue.
The text was updated successfully, but these errors were encountered: