File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
sagemaker-core/src/sagemaker/core/helper Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -330,16 +330,16 @@ def get_caller_identity_arn(self):
330330 user_profile_name = metadata .get ("UserProfileName" )
331331 execution_role_arn = metadata .get ("ExecutionRoleArn" )
332332 try :
333+ # find execution role from the metadata file if present
334+ if execution_role_arn is not None :
335+ return execution_role_arn
336+
333337 if domain_id is None :
334338 instance_desc = self .sagemaker_client .describe_notebook_instance (
335339 NotebookInstanceName = instance_name
336340 )
337341 return instance_desc ["RoleArn" ]
338342
339- # find execution role from the metadata file if present
340- if execution_role_arn is not None :
341- return execution_role_arn
342-
343343 user_profile_desc = self .sagemaker_client .describe_user_profile (
344344 DomainId = domain_id , UserProfileName = user_profile_name
345345 )
You can’t perform that action at this time.
0 commit comments