Configure application-scoped IAM roles for simplified trusted identity propagation - Amazon EMR
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Configure application-scoped IAM roles for simplified trusted identity propagation

With simplified trusted identity propagation on Amazon EMR on EC2 release 8.2 and higher, the IAMConfiguration of the security configuration controls the runtime role that Amazon EMR uses when a request omits the execution role. For an overview of simplified trusted identity propagation, see Simplified trusted identity propagation.

{ "AuthorizationConfiguration": { "IAMConfiguration": { "EnableApplicationScopedIAMRole": false, "DefaultApplicationScopedIAMRole": "<IAM-Role-Arn>" } } }
  • EnableApplicationScopedIAMRole – a security configuration that enables runtime roles works unchanged, and identity propagation is always enabled on it. Set this field to false to accept simplified trusted identity propagation credentials on a cluster that doesn't require an execution role on every request. In that case, Amazon EMR uses DefaultApplicationScopedIAMRole as the runtime role for a request without an execution role. When this field is true, Amazon EMR rejects a request that doesn't specify an execution role.

  • DefaultApplicationScopedIAMRole – the runtime role that Amazon EMR uses for a request without an execution role, on a cluster where EnableApplicationScopedIAMRole is false. If this field is undefined, callers that use simplified trusted identity propagation fall back to IAMRoleForEMRIdentityCenterApplicationARN on a cluster that uses IAM Identity Center, or to the instance profile on a cluster without IAM Identity Center. When EnableApplicationScopedIAMRole is true, Amazon EMR rejects a request that doesn't specify an execution role. A step or session runs without a propagated identity only when Amazon EMR falls back to the instance profile.

The following rules apply to the runtime role and to IAM policy conditions:

  • On a cluster where EnableApplicationScopedIAMRole is false, a request that names an execution role is accepted only on a cluster that uses IAM Identity Center, and only when it names the cluster's recorded role: DefaultApplicationScopedIAMRole, or IAMRoleForEMRIdentityCenterApplicationARN if DefaultApplicationScopedIAMRole isn't set. Amazon EMR rejects any other role. On a cluster without IAM Identity Center, a request that names a role is rejected.

  • When EnableApplicationScopedIAMRole is false and Amazon EMR uses the default role, the elasticmapreduce:ExecutionRoleArn condition in IAM policies doesn't constrain which role Amazon EMR uses. Control access through the caller's permissions for AddJobFlowSteps, GetClusterSessionCredentials, and StartSession on the cluster.

  • On a cluster where EnableApplicationScopedIAMRole is true, every request must pass an execution role. Amazon EMR never substitutes DefaultApplicationScopedIAMRole, so the elasticmapreduce:ExecutionRoleArn condition always applies.