Can't use optFn
to set region for S3 Express operations (credentials issue)
#2777
Labels
bug
This issue is a bug.
p2
This is a standard priority issue
queued
This issues is on the AWS team's backlog
workaround-available
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
S3 Express buckets require credentials that are implicitly retrieved with the
CreateSession
API operation. However, if the region is set using anoptFn
, that region is not propagated to theCreateSession
call, and results in this error:In this case my S3 client was initialized with the
us-west-1
region, but I'm attempting to set the region tous-west-2
in anoptFn
, but this is not respected in theCreateSession
call.Expected Behavior
I expect
optFn
functions to be forwarded to theCreateSession
operation.Current Behavior
optFn
functions do not affect S3 Express credentials fetching.Reproduction Steps
Possible Solution
Apply
optFn
functions first, and then clone the resulting client options before callingCreateSession
?Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.23.1 darwin/arm64
Operating System and version
macOS 14.6.1
The text was updated successfully, but these errors were encountered: