Closed cristiangb13 closed 7 months ago
Hi @cristiangb13 ,
This issue smells like https://github.com/aws/aws-sdk-go-v2/issues/2467
Can you give this a look?
Thanks, Ran~
Hi @RanVaknin!
Yes, it is the same. Sorry, I hadn't found that issue.
Thank you very much.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Describe the bug
When upgrading to github.com/aws/aws-sdk-go-v2 v1.24.1 I am getting a
SignatureDoesNotMatch
error when doing a PUT on a presigned url.Expected Behavior
No errors when PUT request to presingned url
Current Behavior
When I make the PUT request to the presigned url this is the error:
Reproduction Steps
Generate presigned URL:
Make a request to the presigned URL generated.
Possible Solution
I have been debugging and I think the error is introduced in this commit.
Now when the presigned url is generated it goes through this middleware github.com/aws/aws-sdk-go-v2@v1.24.1/aws/retry/middleware.go:286 that adds this header
Amz-Sdk-Request
:And this causes the url to be generated with this
&X-Amz-SignedHeaders=amz-sdk-request;host
in aws/aws-sdk-go-v2@v1.24.1/aws/signer/v4/v4.go:185 onsignedHeadersStr = amz-sdk-request;host
With github.com/aws/aws-sdk-go-v2 v1.24.0
signedHeadersStr = host
If I exclude the header
Amz-Sdk-Request
at github.com/aws/aws-sdk-go-v2@v1.24.1/aws/signer/internal/v4/headers.go:4The url is generated correctly and works.
I don't have much context and I don't know if the solution is to simply add the header to
IgnoredHeaders
or if it shouldn't go through that Middleware.Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2 v1.24.1
Compiler and Version used
go version go1.21.1 darwin/arm64
Operating System and version
macOS Ventura 13.4