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.
There were two issues that led to this bug.
get_endpoint()
would return the global endpoint if one was defined whenever an unknown region_name was given (botocore.session.get_session().get_service('s3').get_endpoint('DOES NOT EXIST')
)As a result, the special casing for the fips govcloud region was not being handled correctly. In order to address this I've changed the region name in s3.extra.json to match what's in _regions.json. I've also added a test specifically for fips.
I also started to fix the get_endpoint() method by raising an exception when you try to create an endpoint for an known region, but for the time being I have to leave it in. The added test discusses this behavior, and it's something we might be able to change later, but for now I think we have to leave it in.
cc @danielgtaylor