Skip to content

s3.WithPresignExpires introduces additional http header  #2749

Closed as not planned
@qsun0621

Description

Acknowledgements

Describe the bug

When we call func "PresignGetObject" to generate a presigned URL, we need to provide the expiration time.
The presigned URL can be used directly when we specific the expiration time using

func(opts *s3.PresignOptions) {
		opts.Expires = time.Duration(lifetimeSecs * int64(time.Second))
	}

However when we use s3.WithPresignExpires() func, it introduced another header "Amz-Sdk-Request":["attempt=1; max=3"] in the presigned HTTP request, which makes the direct GET on the URL without header always returning a signature not match error.

Expected Behavior

s3.WithPresignExpires() does not add the additional retry header

Current Behavior

s3.WithPresignExpires() adds the additional retry header

Reproduction Steps

PresignGetObject(ctx, &s3.GetObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(key),
}, s3.WithPresignExpires(expiresIn))

Possible Solution

No response

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

v1.30.3

Compiler and Version used

go1.22.5 darwin/arm64

Operating System and version

Sonoma 14.6.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions