sagemaker-python-sdk: Bug: change: use regional endpoint when creating AWS STS client #1026
Please fill out the form below.
System Information
- Python 3.6.9
- Sagemaker SDK 1.39.0
Describe the problem
PR #1026 introduced a bug by not using a scheme for a particular STS endpoint
Minimal repro / logs
sagemaker.get_execution_role(sagemaker_session)
Leads to this stack trace
File "/Library/Caches/virtualenvs/gocentral-ml-sagemaker-0XKWRhha-py3.6/lib/python3.6/site-packages/sagemaker/session.py", line 1386, in get_caller_identity_arn
"sts", endpoint_url=sts_regional_endpoint(self.boto_region_name)
File "/Library/Caches/virtualenvs/gocentral-ml-sagemaker-0XKWRhha-py3.6/lib/python3.6/site-packages/boto3/session.py", line 263, in client
aws_session_token=aws_session_token, config=config)
File "/Library/Caches/pypoetry/virtualenvs/gocentral-ml-sagemaker-0XKWRhha-py3.6/lib/python3.6/site-packages/botocore/session.py", line 839, in create_client
client_config=config, api_version=api_version)
File "/Library/Caches/pypoetry/virtualenvs/gocentral-ml-sagemaker-0XKWRhha-py3.6/lib/python3.6/site-packages/botocore/client.py", line 86, in create_client
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/Library/Caches/pypoetry/virtualenvs/gocentral-ml-sagemaker-0XKWRhha-py3.6/lib/python3.6/site-packages/botocore/client.py", line 328, in _get_client_args
verify, credentials, scoped_config, client_config, endpoint_bridge)
File "/Library/Caches/pypoetry/virtualenvs/gocentral-ml-sagemaker-0XKWRhha-py3.6/lib/python3.6/site-packages/botocore/args.py", line 85, in get_client_args
client_cert=new_config.client_cert)
File "/Library/Caches/pypoetry/virtualenvs/gocentral-ml-sagemaker-0XKWRhha-py3.6/lib/python3.6/site-packages/botocore/endpoint.py", line 261, in create_endpoint
raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: sts.us-west-2.amazonaws.com
The endpoint.py
requires a scheme and non is provided via the sts_regional_endpoint
method.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (4 by maintainers)
Commits related to this issue
- feat: ModelBuilder integration to streamline/enable model deployment - Galactus (#1212) Co-authored-by: Gary Wang <garywan@amazon.com> Co-authored-by: Gary Wang <38331932+gwang111@users.noreply.githu... — committed to knikure/sagemaker-python-sdk by gwang111 8 months ago
- feat: ModelBuilder for simplified model testing and deployment (#1266) Co-authored-by: Gary Wang <garywan@amazon.com> Co-authored-by: Gary Wang <38331932+gwang111@users.noreply.github.com> Co-autho... — committed to aws/sagemaker-python-sdk by knikure 8 months ago
- fix: Model builder Final Fixes(#1369) Co-authored-by: Raymond Liu <tzujui@amazon.com> Co-authored-by: Ruilian Gao <ruiliann@amazon.com> Co-authored-by: John Barboza <johnbarb@amazon.com> Co-author... — committed to aws/sagemaker-python-sdk by gwang111 8 months ago
- feat: ModelBuilder for simplified model testing and deployment (#1266) Co-authored-by: Gary Wang <garywan@amazon.com> Co-authored-by: Gary Wang <38331932+gwang111@users.noreply.github.com> Co-autho... — committed to aws/sagemaker-python-sdk by knikure 8 months ago
- fix: Model builder Final Fixes(#1369) Co-authored-by: Raymond Liu <tzujui@amazon.com> Co-authored-by: Ruilian Gao <ruiliann@amazon.com> Co-authored-by: John Barboza <johnbarb@amazon.com> Co-author... — committed to aws/sagemaker-python-sdk by gwang111 8 months ago
It’s working for me:
Yeah, I am block now for the same thing, cannot use jupyter notebook even for demo notebooks, this issue is a headache, totally crazy a company as Amazon has this type of bugs
v1.39.1 has just been released, and should contain the fix.