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: