File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -208,8 +208,10 @@ def default_bucket(self):
208208 if self ._default_bucket :
209209 return self ._default_bucket
210210
211- account = self .boto_session .client ("sts" ).get_caller_identity ()["Account" ]
212211 region = self .boto_session .region_name
212+ account = self .boto_session .client (
213+ "sts" , region_name = region , endpoint_url = sts_regional_endpoint (region )
214+ ).get_caller_identity ()["Account" ]
213215 default_bucket = "sagemaker-{}-{}" .format (region , account )
214216
215217 s3 = self .boto_session .resource ("s3" )
@@ -1400,7 +1402,9 @@ def get_caller_identity_arn(self):
14001402 )
14011403
14021404 assumed_role = self .boto_session .client (
1403- "sts" , endpoint_url = sts_regional_endpoint (self .boto_region_name )
1405+ "sts" ,
1406+ region_name = self .boto_region_name ,
1407+ endpoint_url = sts_regional_endpoint (self .boto_region_name ),
14041408 ).get_caller_identity ()["Arn" ]
14051409
14061410 if "AmazonSageMaker-ExecutionRole" in assumed_role :
You can’t perform that action at this time.
0 commit comments