SageMakerStudioEMRServiceRolePolicy

Last Modified

Mar 12, 2026

March 12, 2026 at 09:29 PM UTC

Version

v9

Total Versions

4

Created

Feb 12, 2026

Actions

10

Risk

Medium

The same capabilities in a scoped form, resource policy writes, reads across all data, or full access to a whole service. Read from this policy document alone: trust policies, boundaries and SCPs in your account still decide what actually succeeds. How this is assessed

  • Medium

    Can launch resources that run as a more privileged role

    Grants the actions of 1 documented escalation path, but only on named resources or under a condition. Review that scope before trusting it.

    • ec2-001iam:PassRole + ec2:RunInstancesscoped
      • iam:PassRole: condition aws:PrincipalTag/AmazonDataZoneEnvironment, aws:PrincipalTag/AmazonDataZoneProject, aws:ResourceAccount, iam:PassedToService, on arn:aws:iam::*:role/datazone_emr_ec2_instance_role_${aws:PrincipalTag/AmazonDataZoneProject}_${aws:PrincipalTag/AmazonDataZoneEnvironment}
      • ec2:RunInstances: condition ec2:Vpc

    Use with caution: Check which roles, users or policies fall inside the scope shown above. Within it the escalation works as documented, so keep privileged principals out of it.

Policy Document

View on GitHub
{
  "PolicyVersion": {
    "Document": {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "PassRoleToEMREC2InstanceRole",
          "Effect": "Allow",
          "Action": "iam:PassRole",
          "Resource": "arn:aws:iam::*:role/datazone_emr_ec2_instance_role_${aws:PrincipalTag/AmazonDataZoneProject}_${aws:PrincipalTag/AmazonDataZoneEnvironment}",
          "Condition": {
            "StringLike": {
              "iam:PassedToService": "ec2.amazonaws.com"
            },
            "StringNotEquals": {
              "aws:PrincipalTag/AmazonDataZoneProject": "",
              "aws:PrincipalTag/AmazonDataZoneEnvironment": ""
            },
            "Null": {
              "aws:PrincipalTag/AmazonDataZoneProject": "false"
            },
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Sid": "CreateInNetworkForSharedSubnet",
          "Effect": "Allow",
          "Action": [
            "ec2:CreateNetworkInterface",
            "ec2:RunInstances",
            "ec2:CreateFleet"
          ],
          "Resource": [
            "*"
          ],
          "Condition": {
            "ArnLike": {
              "ec2:Vpc": "arn:aws:ec2:*:*:vpc/${aws:PrincipalTag/VpcId}"
            }
          }
        },
        {
          "Sid": "EMRKMSPermissions",
          "Effect": "Allow",
          "Action": [
            "kms:CreateGrant",
            "kms:Decrypt",
            "kms:Encrypt",
            "kms:GenerateDataKeyWithoutPlaintext"
          ],
          "Resource": "arn:aws:kms:*:*:key/${aws:PrincipalTag/KmsKeyId}",
          "Condition": {
            "StringLike": {
              "kms:ViaService": [
                "ec2.*.amazonaws.com"
              ]
            },
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            },
            "Null": {
              "kms:EncryptionContextKeys": "false"
            }
          }
        },
        {
          "Sid": "AllowGenerateDataKeyForEbsEncryption",
          "Effect": "Allow",
          "Action": "kms:GenerateDataKey",
          "Resource": "arn:aws:kms:*:*:key/${aws:PrincipalTag/KmsKeyId}",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Sid": "AllowDescribeKeyForLogPusherCMK",
          "Effect": "Allow",
          "Action": [
            "kms:DescribeKey"
          ],
          "Resource": "arn:aws:kms:*:*:key/${aws:PrincipalTag/KmsKeyId}",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        }
      ]
    },
    "VersionId": "v9",
    "IsDefaultVersion": true,
    "CreateDate": "2026-02-12T17:58:51+00:00"
  }
}

Version History (7 recorded)

Raw history
v9updated

scope changed, no action added or removed

d05cf93

SageMakerStudioEMRServiceRolePolicy - Policy Version v9

No recorded action delta - this version predates the change index. View the raw diff.

Feb 12, 2026

3f4a950

SageMakerStudioEMRServiceRolePolicy - Policy Version v6

No recorded action delta - this version predates the change index. View the raw diff.

Feb 12, 2026

6499e06

SageMakerStudioEMRServiceRolePolicy - Policy Version v3

No recorded action delta - this version predates the change index. View the raw diff.

Jul 22, 2025

39b271c

SageMakerStudioEMRServiceRolePolicy - Policy Version v2

No recorded action delta - this version predates the change index. View the raw diff.

Jul 22, 2025

62d6123

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

Feb 27, 2025

76c98d9

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

Jan 31, 2025

81c625a