Skip to content
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

aws-mfa doesn't work for China #76

Open
shantanugupta opened this issue Jun 7, 2022 · 1 comment
Open

aws-mfa doesn't work for China #76

shantanugupta opened this issue Jun 7, 2022 · 1 comment

Comments

@shantanugupta
Copy link

Upon debugging the issue, if we are not passing region explicitly - enpoint URL gets resolved for global.
#endpoint_url = 'https://sts.cn-north-1.amazonaws.com.cn'
region_name = 'cn-north-1'

If we provide region_name in boto3, it was able to resolve the url. So region_name should be provided by the dev explicitly or region should be pulled from profile before hitting sts request.

client = boto3.client(
'sts',
aws_access_key_id=lt_key_id,
aws_secret_access_key=lt_access_key,
#endpoint_url = 'https://sts.cn-north-1.amazonaws.com.cn'
region_name = 'cn-north-1'
)

@shantanugupta
Copy link
Author

Upon debugging the issue, if we are not passing region explicitly - enpoint URL gets resolved for global. #endpoint_url = 'https://sts.cn-north-1.amazonaws.com.cn' region_name = 'cn-north-1'

If we provide region_name in boto3, it was able to resolve the url. So region_name should be provided by the dev explicitly or region should be pulled from profile before hitting sts request.

client = boto3.client( 'sts', aws_access_key_id=lt_key_id, aws_secret_access_key=lt_access_key, #endpoint_url = 'https://sts.cn-north-1.amazonaws.com.cn' region_name = 'cn-north-1' )

Added a pull request to resolve this - #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant