

def _create_role_with_role_policy(self, role_name, assume_role_policy, role_arn):
    'Method to create role with a given rolename, assume_role_policy\n        and role_arn\n        '
    create_role_response = self._iam_client.create_role(RoleName=role_name, AssumeRolePolicyDocument=dict_to_string(assume_role_policy))
    self._iam_client.attach_role_policy(PolicyArn=role_arn, RoleName=role_name)
    return create_role_response

dataset/ETHPy150Open aws/aws-cli/awscli/customizations/datapipeline/createdefaultroles.py CreateDefaultRoles._create_role_with_role_policy/original