AWS emr: Clarify runtime role fallback and ExecutionRoleArn condition scope
Summary
Adds notes explaining how runtime roles are resolved with simplified trusted identity propagation (DefaultApplicationScopedIAMRole, IAMRoleForEMRIdentityCenterApplicationARN, instance profile fallback) and that the elasticmapreduce:ExecutionRoleArn condition only applies when a request passes an execution role.
Security assessment
Explains when an IAM condition key does and does not constrain role selection, and directs users to restrict AddJobFlowSteps/GetClusterSessionCredentials/StartSession permissions — directly relevant to preventing privilege escalation via runtime roles.
Evidence
The `elasticmapreduce:ExecutionRoleArn` condition applies only when a request passes an execution role. On a cluster where `EnableApplicationScopedIAMRole` is `true`, every request must pass an execution role. Amazon EMR never substitutes `DefaultApplicationScopedIAMRole`, so this condition always applies. When Amazon EMR uses the default role because `EnableApplicationScopedIAMRole` is `false`, this condition doesn't constrain which role Amazon EMR uses. In that case, control access through the caller's permissions for `AddJobFlowSteps`, `GetClusterSessionCredentials`, and `StartSession` on the cluster.
Diff
diff --git a/emr/latest/ManagementGuide/emr-steps-runtime-roles.md b/emr/latest/ManagementGuide/emr-steps-runtime-roles.md index e8c3935..e2a7a40 100644 --- a//emr/latest/ManagementGuide/emr-steps-runtime-roles.md +++ b//emr/latest/ManagementGuide/emr-steps-runtime-roles.md @@ -20,0 +21,4 @@ Note +With simplified trusted identity propagation on Amazon EMR on EC2 release 8.2 and higher, a runtime role automatically carries the identity of the user who submits the job to downstream services, with no identity-propagation configuration. For a step without an execution role, on a cluster where `EnableApplicationScopedIAMRole` is `false`, Amazon EMR uses the cluster's `DefaultApplicationScopedIAMRole` as the runtime role. If that field isn't set, 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 step that doesn't specify an execution role. A step runs without a propagated identity only when Amazon EMR falls back to the instance profile. For more information, see [Simplified trusted identity propagation](./emr-tip-simplified.html). + +Note + @@ -183,0 +188,4 @@ You must create a condition based on the `elasticmapreduce:ExecutionRoleArn` con +Note + +The `elasticmapreduce:ExecutionRoleArn` condition applies only when a request passes an execution role. On a cluster where `EnableApplicationScopedIAMRole` is `true`, every request must pass an execution role. Amazon EMR never substitutes `DefaultApplicationScopedIAMRole`, so this condition always applies. When Amazon EMR uses the default role because `EnableApplicationScopedIAMRole` is `false`, this condition doesn't constrain which role Amazon EMR uses. In that case, control access through the caller's permissions for `AddJobFlowSteps`, `GetClusterSessionCredentials`, and `StartSession` on the cluster. +