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 tofalseto accept simplified trusted identity propagation credentials on a cluster that doesn't require an execution role on every request. In that case, Amazon EMR usesDefaultApplicationScopedIAMRoleas the runtime role for a request without an execution role. When this field istrue, 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 whereEnableApplicationScopedIAMRoleisfalse. If this field is undefined, callers that use simplified trusted identity propagation fall back toIAMRoleForEMRIdentityCenterApplicationARNon a cluster that uses IAM Identity Center, or to the instance profile on a cluster without IAM Identity Center. WhenEnableApplicationScopedIAMRoleistrue, 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
EnableApplicationScopedIAMRoleisfalse, 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, orIAMRoleForEMRIdentityCenterApplicationARNifDefaultApplicationScopedIAMRoleisn't set. Amazon EMR rejects any other role. On a cluster without IAM Identity Center, a request that names a role is rejected. -
When
EnableApplicationScopedIAMRoleisfalseand Amazon EMR uses the default role, theelasticmapreduce:ExecutionRoleArncondition in IAM policies doesn't constrain which role Amazon EMR uses. Control access through the caller's permissions forAddJobFlowSteps,GetClusterSessionCredentials, andStartSessionon the cluster. -
On a cluster where
EnableApplicationScopedIAMRoleistrue, every request must pass an execution role. Amazon EMR never substitutesDefaultApplicationScopedIAMRole, so theelasticmapreduce:ExecutionRoleArncondition always applies.