Default sts client config to regional endpoints #3309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Around 2022, AWS announced that all new SDKs would change the default STS endpoint behavior from the
legacy
endpoint toregional
as documented here.This is used when clients call
sts:AssumeRole
. Using thelegacy
behavior, clients connect tosts.amazonaws.com,
which lives inus-east-1.
Workloads outside of that region using this configuration unknowingly depend on that region since they are not using theregional
endpoint where their code runs.botocore was never updated, so today, all calls to the STS API, unless otherwise explicitly configured, will use the "global" endpoint in
us-east-1.
There was an outage in Aug 2024 which impacted STS in
us-east-1
.Had botocore been updated, this specific event would not have impaired workloads running in other regions using a default client.
This PR attempts to align the new "default" to
regional
as specified by the documentation.Should you require the old behavior, you can always set the environment variable to override the new default back to
legacy
(as documented):A follow-up change to the documentation here will be needed to reflect this change.
Not a Python guru here, so I did my best at a first crack. Please review.
Thanks!