Cannot Override STS Environment Variable #2802
Labels
bug
This issue is a bug.
closed-for-staleness
p3
This is a minor priority issue
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
It's not possible to provide an override for the STS endpoint. If you supply the
AWS_ENDPOINT_URL_STS
andAWS_STS_REGIONAL_ENDPOINTS="global"
environment variables it will still try to use sts..amazonaws.com. This is possible to override by changing the AWS config.Regression Issue
Expected Behavior
When an AWS_ENDPOINT_URL_STS environment variable is supplied with AWS_STS_REGIONAL_ENDPOINTS set to global, the provided endpoint should be used.
Current Behavior
The AWS STS endpoint is always used.
Reproduction Steps
I created a Gist here https://gist.github.com/matty234/3ed5fe6d13a0555a1ee8050021bd7f60. When run the the sts endpoint is still used:
➜ stsstufff env AWS_ENDPOINT_URL_STS="https://sdfsdf.com" AWS_STS_REGIONAL_ENDPOINTS="global" AWS_IGNORE_CONFIGURED_ENDPOINT_URLS=true AWS_ENDPOINT_URL="https://sdfsdf.com" go run .
Got an error getting the caller identity:
operation error STS: GetCallerIdentity, https response error StatusCode: 0, RequestID: , request send failed, Post "https://sts.us-blah-2.amazonaws.com/": dial tcp: lookup sts.us-blah-2.amazonaws.com: no such host
Possible Solution
No response
Additional Information/Context
I'm happy to build a solution but I wanted to check I wasn't missing something!
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.22.2 darwin/arm64
Operating System and version
MacOS
The text was updated successfully, but these errors were encountered: