-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Method utils.sts_regional_endpoint(region) always returns the global STS endpoint for all regions? #1332
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
Comments
Thanks for reaching out! |
@knakad Thanks for looking into this, here's the result: $ pip freeze | grep boto
boto==2.49.0
boto3==1.12.15
botocore==1.15.15 Furthermore it seems like it's working correctly only if you use sudo? $ sudo python3 -c 'import sagemaker; print(sagemaker.utils.sts_regional_endpoint("eu-west-1"))'
https://sts.eu-west-1.amazonaws.com
|
Solved! From further testing it turns out the boto3 version was terribly outdated and caused this issue (due to a oversight on our part since $ pip3 freeze | grep boto
boto==2.49.0
boto3==1.9.188
botocore==1.12.247 Updating to the latest release solved the issue: Background We tried to initialize and deploy a PyTorch model without declaring botocore.exceptions.ClientError: An error occurred (SignatureDoesNotMatch) when calling the GetCallerIdentity operation: Credential should be scoped to a valid region, not 'eu-west-1' Seems like it's all good now, thanks for the help! |
…ator (#1332) Co-authored-by: Rohan Gujarathi <[email protected]>
…ator (#1332) Co-authored-by: Rohan Gujarathi <[email protected]>
Describe the bug
We'd like to return the regional STS endpoint with
utils.sts_regional_endpoint(region)
, although this method always returns the global endpointhttps://sts.amazonaws.com
for all valid regions as well as non existent ones.To reproduce
This can be easily reproduced with a one liner:
python3 -c 'import sagemaker; print(sagemaker.utils.sts_regional_endpoint("eu-west-1"))'
Expected behavior
We're expecting to get a regional endpoint such as:
sts.eu-west-1.amazonaws.com
if the method parameter iseu-west-1
instead of the global endpointhttps://sts.amazonaws.com
. The regional endpoints can be found in the AWS documentation: Managing AWS STS in an AWS Region.System information
The text was updated successfully, but these errors were encountered: