Friday, August 5, 2016

IAM Errors when Creating Amazon EMR

There are errors related to the lack of permissions in the EMR_EC2_DefaultRole whenever I launch a Amazon EMR cluster. After some searching on the support forum, the default EMR role may not be created automatically for you. Hence, I removed the old default role and created new one as follows:
  1. Create default role: 
    • aws emr create-default-roles
  2. Create instance profile: 
    • aws iam create-instance-profile --instance-profile-name EMR_EC2_DefaultRole
  3. Verify that instance profile exists but doesn't have any roles:
    • aws iam get-instance-profile --instance-profile-name EMR_EC2_DefaultRole
  4. Add the role using:
    • aws iam add-role-to-instance-profile --instance-profile-name EMR_EC2_DefaultRole --role-name EMR_EC2_DefaultRole

No comments:

Post a Comment