I'm trying to stand up a new cluster in AWS EMR, but it immediately fails with the following error:
Service-linked role 'AWSServiceRoleForEMRCleanup' for EMR is required. Please create this role directly or add permission to create it in your IAM entity.
My service role for EMR has the following permission:
- Effect: Allow
Action:
- iam:CreateServiceLinkedRole
- iam:PutRolePolicy
Resource:
- "arn:aws:iam::<account-id>:role/aws-service-role/elasticmapreduce.amazonaws.com/AWSServiceRoleForEMRCleanup"
I've tried using * as the resource as well, which produces the same results.
I have also attempted to create the role directly as the error suggests, but that fails due to AWSServiceRole being a reserved prefix for role names created by AWS.