SageMakerStudioEMRInstanceRolePolicy

Last Modified

Jun 2, 2026

June 2, 2026 at 12:03 AM UTC

Version

v4

Total Versions

2

Created

Jun 1, 2026

Actions

11

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 take over other users or roles

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

    • sts-001sts:AssumeRolescoped
      • sts:AssumeRole: condition aws:TagKeys, iam:ResourceTag/AmazonDataZoneProject

    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": "AccessCertificateLocationS3Permission",
          "Effect": "Allow",
          "Action": "s3:GetObject",
          "Resource": "arn:aws:s3:::${aws:PrincipalTag/DomainBucketName}/${aws:PrincipalTag/AmazonDataZoneDomain}/certificate_location/*",
          "Condition": {
            "StringNotEquals": {
              "aws:PrincipalTag/DomainBucketName": "",
              "aws:PrincipalTag/AmazonDataZoneDomain": ""
            },
            "Null": {
              "aws:PrincipalTag/AmazonDataZoneProject": "false"
            },
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Sid": "AccessPatchingRPMsS3Permission",
          "Effect": "Allow",
          "Action": "s3:GetObject",
          "Resource": [
            "arn:aws:s3:::default-env-blueprint-*/*",
            "arn:aws:s3:::awssmuscompute-blueprint-bucket-*/*",
            "arn:aws:s3:*:*:accesspoint/env-blueprint-accesspoint*",
            "arn:aws:s3:*:*:accesspoint/env-partner-blueprint-accesspoint*"
          ],
          "Condition": {
            "ArnLike": {
              "s3:DataAccessPointArn": [
                "arn:aws:s3:*:*:accesspoint/env-blueprint-accesspoint",
                "arn:aws:s3:*:*:accesspoint/env-partner-blueprint-accesspoint"
              ]
            },
            "StringNotEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Sid": "AccessBootstrapActionScriptS3Permission",
          "Effect": "Allow",
          "Action": "s3:GetObject",
          "Resource": "arn:aws:s3:::${aws:PrincipalTag/DomainBucketName}/${aws:PrincipalTag/AmazonDataZoneDomain}/${aws:PrincipalTag/AmazonDataZoneProject}/${aws:PrincipalTag/AmazonDataZoneScopeName}/sys/emr/bootstrap-script/*",
          "Condition": {
            "StringNotEquals": {
              "aws:PrincipalTag/DomainBucketName": "",
              "aws:PrincipalTag/AmazonDataZoneDomain": "",
              "aws:PrincipalTag/AmazonDataZoneProject": "",
              "aws:PrincipalTag/AmazonDataZoneScopeName": ""
            },
            "Null": {
              "aws:PrincipalTag/AmazonDataZoneProject": "false"
            },
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Sid": "EMRClusterLogUploadS3Permission",
          "Effect": "Allow",
          "Action": "s3:PutObject",
          "Resource": "arn:aws:s3:::${aws:PrincipalTag/DomainBucketName}/${aws:PrincipalTag/AmazonDataZoneDomain}/${aws:PrincipalTag/AmazonDataZoneProject}/${aws:PrincipalTag/AmazonDataZoneScopeName}/sys/emr/*",
          "Condition": {
            "StringNotEquals": {
              "aws:PrincipalTag/DomainBucketName": "",
              "aws:PrincipalTag/AmazonDataZoneDomain": "",
              "aws:PrincipalTag/AmazonDataZoneProject": "",
              "aws:PrincipalTag/AmazonDataZoneScopeName": ""
            },
            "Null": {
              "aws:PrincipalTag/AmazonDataZoneProject": "false"
            },
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Sid": "EMRRuntimeRoleAssumePermissions",
          "Effect": "Allow",
          "Action": [
            "sts:AssumeRole",
            "sts:TagSession"
          ],
          "Resource": "*",
          "Condition": {
            "ForAllValues:StringEquals": {
              "aws:TagKeys": [
                "LakeFormationAuthorizedCaller"
              ]
            },
            "StringEquals": {
              "iam:ResourceTag/AmazonDataZoneProject": "${aws:PrincipalTag/AmazonDataZoneProject}"
            }
          }
        },
        {
          "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}"
            }
          }
        }
      ]
    },
    "VersionId": "v4",
    "IsDefaultVersion": true,
    "CreateDate": "2026-06-01T23:27:10+00:00"
  }
}

Version History (5 recorded)

Raw history
v4updated

scope changed, no action added or removed

b770f07
v3updated

scope changed, no action added or removed

8414063

SageMakerStudioEMRInstanceRolePolicy - Policy Version v3

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

Feb 12, 2026

9c129b3

SageMakerStudioEMRInstanceRolePolicy - Policy Version v2

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

Feb 12, 2026

5a4df90

Update detected

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

Feb 27, 2025

76c98d9