b45d79c487767508321322fb5848876749a257b4,src/sagemaker/session.py,Session,expand_role,#Session#Any#,522

Before Change


        if "/" in role:
            return role
        else:
            account = self.boto_session.client("sts").get_caller_identity()["Account"]
            return "arn:aws:iam::{}:role/{}".format(account, role)

    def get_caller_identity_arn(self):
        Returns the ARN user or role whose credentials are used to call the API.
        Returns:

After Change


        if "/" in role:
            return role
        else:
            return boto3.resource("iam").Role(role).arn

    def get_caller_identity_arn(self):
        Returns the ARN user or role whose credentials are used to call the API.
        Returns:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: aws/sagemaker-python-sdk
Commit Name: b45d79c487767508321322fb5848876749a257b4
Time: 2018-02-02
Author: nacho950@gmail.com
File Name: src/sagemaker/session.py
Class Name: Session
Method Name: expand_role


Project Name: ray-project/ray
Commit Name: 76450c8d4777f12188203e8303d7fd7eb499210c
Time: 2020-05-28
Author: smtp.pdames@gmail.com
File Name: python/ray/autoscaler/aws/config.py
Class Name:
Method Name: _client


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 46e66f8d126141a001b1facf285d12c08347df5c
Time: 2018-09-26
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAUtil/QASql.py
Class Name:
Method Name: QA_util_sql_async_mongo_setting


Project Name: studioml/studio
Commit Name: 9ffbc8686725e1f80d803283894e0c20db263aa8
Time: 2020-08-04
Author: andrei.denissov@cognizant.com
File Name: tests/artifact_store_test.py
Class Name: S3ArtifactStoreTest
Method Name: get_qualified_location_prefix