Closed
Description
Describe the bug
When generating a presigned URL with PresignPutObject and setting the Expires field, attempting to put an object to S3 returns the error "SignatureDoesNotMatch". However, without setting the Expires field, it works fine.
Expected Behavior
return 200
Current Behavior
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
Reproduction Steps
// not working
request, err := s.s3Presign.PresignPutObject(ctx, &s3.PutObjectInput{
Bucket: &bucket,
Key: &key,
Expires: &expire,
}, s3.WithPresignExpires(6*time.Hour))
if err != nil {
return nil, err
}
// works fine
request, err := s.s3Presign.PresignPutObject(ctx, &s3.PutObjectInput{
Bucket: &bucket,
Key: &key,
}, s3.WithPresignExpires(6*time.Hour))
if err != nil {
return nil, err
}
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.21.3 darwin/arm64
Operating System and version
macOS Ventura 13.6.4
Metadata
Assignees
Labels
No labels
Activity