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

Getting error The request signature we calculated does not match the signature you provided. Check your key and signing method. #3062

Closed
muditt-humanforce opened this issue Oct 3, 2023 · 3 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue s3

Comments

@muditt-humanforce
Copy link

Describe the bug

While trying to use s3 client put object method, it is returning this error message. The error comes with .net framework only, .net core works fine.

The request signature we calculated does not match the signature you provided. Check your key and signing method.

Expected Behavior

It used to work fine with .net framework and was able to put an object without any errors

Current Behavior

Getting above error probably since daylight savings changes!?

Reproduction Steps

var amazonS3Client = new AmazonS3Client();

var s3PutRequest = new PutObjectRequest
{
BucketName = param.bucketName,
Key = param.key,
ContentBody = param.data
};

var s3PutResponse = await amazonS3Client.PutObjectAsync(s3PutRequest);

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.Core: 3.7.202.18
AWSSDK.S3: 3.7.205.4 and 3.7.205.5 (Error started on 3.7.203.7)

Targeted .NET Platform

.NET Framework 4.8

Operating System and version

Windows 11

@muditt-humanforce muditt-humanforce added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 3, 2023
@muditt-humanforce
Copy link
Author

Same problem is happening when I run it on .net core 6. It only works when the project type is lambda.

@muditt-humanforce
Copy link
Author

Got the problem:
AWS used to be lenient earlier with bucket name and key name, but now it's being validated strictly. We used to pass
bucketName = bucketName + path
key = fileName
This is being rejected by now. Need to pass bucketName as name only and add the path to the key

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@ashishdhingra ashishdhingra added s3 p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Oct 9, 2024
@ashishdhingra ashishdhingra self-assigned this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue s3
Projects
None yet
Development

No branches or pull requests

2 participants