-
Notifications
You must be signed in to change notification settings - Fork 2.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
Getting SignatureDoesNotMatch on PutObject #1112
Comments
Hello @poopoothegorilla, thank you for reaching out to us. By other calls, are you saying this function works with other objects? Can you enable logging and post back the data? Also what Go and SDK version are you using? cfg := aws.NewConfig().WithRegion("us-west-2").WithCredentials(creds).WithLogLevel(aws.LogDebug) |
Thank you for taking the time @xibz. Yep this function has worked with other objects. Go: go1.8 darwin/amd64 I was not quite sure what was or wasnt sensitive information here so I took out some sections. The code above uses the filename "test.psv.gz" but this code i ran with "team_path_items.psv.gz" it is the same code however. 2017/03/01 14:36:53 DEBUG: Request s3/PutObject Details: 2017/03/01 14:36:54 DEBUG: Response s3/PutObject Details: |
@poopoothegorilla , the logs look correct as far as I can tell. Can you post a request that succeeds? |
2017/03/01 19:01:11 DEBUG: Request s3/PutObject Details: 2017/03/01 19:01:13 DEBUG: Response s3/PutObject Details: |
@poopoothegorilla And additional level of debuging output might help here. The following will log the body of the HTTP Request/Response. cfg := aws.NewConfig().
WithRegion("us-west2").
WithCredentials(creds).
WithLogLevel(aws.LogDebugWithHTTPBody | aws.LogDebugWithSigning) This will give you a log of everything the SDK is using to sign the request with. I notice the w := gzip.NewWriter(file)
w.Write("hello")
// Move Close from a defer to inline so everything will be written before trying
// to stat the file.
w.Close()
fileInfo, _ := file.Stat()
fileLen := fileInfo.Size()
fileBytes, _ := ioutil.ReadAll(file) |
I see it now...
|
I ran into the same issue. I was using an IAM user with an old access key that didn't have S3FullAcess in the group permissions. Once I added the correct permissions and created a new access key it worked! Hopefully that fixes it! |
I am receiving
bad response: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method. status code 403
when I run the following code... (to minimize code size i excluded some error checks)
What am I missing here? Both the Key and ID work on other calls... it seems just with this file example. The input does not explicitly set the metadata so it doesn't look like it is related to this past issue #642.
The text was updated successfully, but these errors were encountered: