

def _create_instance_profile_with_role(self, instance_profile_name, role_name):
    'Method to create the instance profile with the role'
    self._iam_client.create_instance_profile(InstanceProfileName=instance_profile_name)
    self._iam_client.add_role_to_instance_profile(InstanceProfileName=instance_profile_name, RoleName=role_name)

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