-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(aws): Assume role for Gov Cloud #4254
fix(aws): Assume role for Gov Cloud #4254
Conversation
@@ -850,8 +850,7 @@ def assume_role( | |||
mfa_info = self.__input_role_mfa_token_and_code__() | |||
assume_role_arguments["SerialNumber"] = mfa_info.arn | |||
assume_role_arguments["TokenCode"] = mfa_info.totp | |||
|
|||
sts_client = create_sts_session(session, AWS_STS_GLOBAL_ENDPOINT_REGION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the issue here, we were always assuming a role with the Global STS Endpoint Region which is us-east-1
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4254 +/- ##
=======================================
Coverage 86.69% 86.69%
=======================================
Files 818 818
Lines 25698 25709 +11
=======================================
+ Hits 22279 22289 +10
- Misses 3419 3420 +1 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Sergio Garcia <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!!
I'm not sure about this backport, we have to check it manually in v3. |
Context
Fixes #4244
Description
Handle AWS Gov Cloud partition while assuming roles.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.