Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sagemaker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def sts_regional_endpoint(region):
Returns:
str: AWS STS regional endpoint
"""
return "sts.{}.amazonaws.com".format(region)
return "https://sts.{}.amazonaws.com".format(region)


class DeferredError(object):
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import time

from boto3 import exceptions
import botocore
import pytest
from mock import call, patch, Mock, MagicMock

Expand Down Expand Up @@ -564,4 +565,5 @@ def walk():

def test_sts_regional_endpoint():
endpoint = sagemaker.utils.sts_regional_endpoint("us-west-2")
assert endpoint == "sts.us-west-2.amazonaws.com"
assert endpoint == "https://sts.us-west-2.amazonaws.com"
assert botocore.utils.is_valid_endpoint_url(endpoint)