AWSTransformApplicationECSDeploymentPolicy

Last Modified

Sep 11, 2026

September 11, 2026 at 01:03 AM UTC

Version

v7

Total Versions

3

Created

Sep 11, 2026

Actions

41

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 6 documented escalation paths, but only on named resources or under a condition. Review that scope before trusting it.

    • cloudformation-001iam:PassRole + cloudformation:CreateStackscoped
      • iam:PassRole: condition aws:ResourceAccount, iam:PassedToService, on arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role, arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role
      • cloudformation:CreateStack: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:cloudformation:*:*:stack/AWSTransform*
    • ecs-001iam:PassRole + ecs:CreateCluster + ecs:RegisterTaskDefinition + ecs:CreateServicescoped
      • iam:PassRole: condition aws:ResourceAccount, iam:PassedToService, on arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role, arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role
      • ecs:CreateCluster: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:cluster/AWSTransform*
      • ecs:RegisterTaskDefinition: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:task-definition/AWSTransform*
      • ecs:CreateService: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:service/AWSTransform*
    • ecs-002iam:PassRole + ecs:CreateCluster + ecs:RegisterTaskDefinition + ecs:RunTaskscoped
      • iam:PassRole: condition aws:ResourceAccount, iam:PassedToService, on arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role, arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role
      • ecs:CreateCluster: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:cluster/AWSTransform*
      • ecs:RegisterTaskDefinition: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:task-definition/AWSTransform*
      • ecs:RunTask: condition aws:ResourceAccount, aws:ResourceTag/CreatedBy, ecs:cluster, on arn:aws:ecs:*:*:task-definition/AWSTransform*
    • ecs-003iam:PassRole + ecs:RegisterTaskDefinition + ecs:CreateServicescoped
      • iam:PassRole: condition aws:ResourceAccount, iam:PassedToService, on arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role, arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role
      • ecs:RegisterTaskDefinition: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:task-definition/AWSTransform*
      • ecs:CreateService: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:service/AWSTransform*
    • ecs-004iam:PassRole + ecs:RegisterTaskDefinition + ecs:RunTaskscoped
      • iam:PassRole: condition aws:ResourceAccount, iam:PassedToService, on arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role, arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role
      • ecs:RegisterTaskDefinition: condition aws:RequestTag/CreatedBy, aws:ResourceAccount, on arn:aws:ecs:*:*:task-definition/AWSTransform*
      • ecs:RunTask: condition aws:ResourceAccount, aws:ResourceTag/CreatedBy, ecs:cluster, on arn:aws:ecs:*:*:task-definition/AWSTransform*
    • ecs-008iam:PassRole + ecs:RunTaskscoped
      • iam:PassRole: condition aws:ResourceAccount, iam:PassedToService, on arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role, arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role
      • ecs:RunTask: condition aws:ResourceAccount, aws:ResourceTag/CreatedBy, ecs:cluster, on arn:aws:ecs:*:*:task-definition/AWSTransform*

    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.

  • Medium

    Can take over existing resources that run as another role

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

    • cloudformation-002cloudformation:UpdateStackscoped
      • cloudformation:UpdateStack: condition aws:ResourceAccount, aws:ResourceTag/CreatedBy, on arn:aws:cloudformation:*:*:stack/AWSTransform*

    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.

IAM Access Analyzer (1)

  • Suggestion / EQUIVALENT_TO_NULL_FALSE

    We recommend replacing the key kms:EncryptionContext:aws:ecr:arn in the condition block of StringLike with {kms:EncryptionContext:aws:ecr:arn: false} to ensure better enforcement of the condition. AWS docs

Policy Document

View on GitHub
{
  "PolicyVersion": {
    "Document": {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": "cloudformation:CreateStack",
          "Resource": "arn:aws:cloudformation:*:*:stack/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:RequestTag/CreatedBy": "AWSTransform"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "cloudformation:UpdateStack",
            "cloudformation:DeleteStack"
          ],
          "Resource": "arn:aws:cloudformation:*:*:stack/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:ResourceTag/CreatedBy": "AWSTransform"
            }
          }
        },
        {
          "Sid": "CloudFormationTagOnCreate",
          "Effect": "Allow",
          "Action": [
            "cloudformation:TagResource",
            "cloudformation:UntagResource"
          ],
          "Resource": "arn:aws:cloudformation:*:*:stack/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "cloudformation:CreateAction": [
                "CreateStack",
                "UpdateStack"
              ]
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "cloudformation:DescribeStacks",
            "cloudformation:DescribeStackEvents"
          ],
          "Resource": "arn:aws:cloudformation:*:*:stack/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "ecs:CreateCluster",
          "Resource": "arn:aws:ecs:*:*:cluster/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:RequestTag/CreatedBy": "AWSTransform"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ecs:UpdateCluster",
            "ecs:DeleteCluster"
          ],
          "Resource": "arn:aws:ecs:*:*:cluster/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "ecs:ResourceTag/CreatedBy": "AWSTransform"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "ecs:RegisterTaskDefinition",
          "Resource": "arn:aws:ecs:*:*:task-definition/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:RequestTag/CreatedBy": "AWSTransform"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "ecs:RunTask",
          "Resource": "arn:aws:ecs:*:*:task-definition/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:ResourceTag/CreatedBy": "AWSTransform"
            },
            "ArnLike": {
              "ecs:cluster": "arn:aws:ecs:*:*:cluster/AWSTransform*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "ecs:ListTasks",
          "Resource": "arn:aws:ecs:*:*:container-instance/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            },
            "ArnLike": {
              "ecs:cluster": "arn:aws:ecs:*:*:cluster/AWSTransform*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "ecs:DescribeTasks",
          "Resource": "arn:aws:ecs:*:*:task/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            },
            "ArnLike": {
              "ecs:cluster": "arn:aws:ecs:*:*:cluster/AWSTransform*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "iam:PassRole",
          "Resource": [
            "arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role",
            "arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role"
          ],
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "iam:PassedToService": [
                "ecs-tasks.amazonaws.com",
                "ecs.amazonaws.com"
              ]
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "iam:GetRole",
            "iam:GetRolePolicy",
            "iam:ListRolePolicies",
            "iam:ListAttachedRolePolicies"
          ],
          "Resource": [
            "arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Task-Role",
            "arn:aws:iam::*:role/AWSTransform-Deploy-ECS-Execution-Role"
          ],
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "ecs:CreateService",
          "Resource": "arn:aws:ecs:*:*:service/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:RequestTag/CreatedBy": "AWSTransform"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ecs:UpdateService",
            "ecs:DeleteService"
          ],
          "Resource": "arn:aws:ecs:*:*:service/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "ecs:ResourceTag/CreatedBy": "AWSTransform"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ecs:TagResource",
            "ecs:UntagResource"
          ],
          "Resource": [
            "arn:aws:ecs:*:*:cluster/AWSTransform*",
            "arn:aws:ecs:*:*:task-definition/AWSTransform*",
            "arn:aws:ecs:*:*:service/AWSTransform*",
            "arn:aws:ecs:*:*:task/AWSTransform*"
          ],
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            },
            "ForAllValues:StringEquals": {
              "aws:TagKeys": [
                "ResourceName",
                "CreatedBy",
                "TransformationType"
              ]
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "logs:CreateLogGroup",
            "logs:TagResource"
          ],
          "Resource": "arn:aws:logs:*:*:log-group:/aws/ecs/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:RequestTag/CreatedBy": "AWSTransform"
            },
            "ForAllValues:StringEquals": {
              "aws:TagKeys": [
                "ResourceName",
                "CreatedBy",
                "TransformationType"
              ]
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "logs:DeleteLogGroup",
            "logs:PutRetentionPolicy"
          ],
          "Resource": "arn:aws:logs:*:*:log-group:/aws/ecs/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "logs:UntagResource",
          "Resource": "arn:aws:logs:*:*:log-group:/aws/ecs/AWSTransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            },
            "ForAllValues:StringEquals": {
              "aws:TagKeys": [
                "ResourceName",
                "CreatedBy",
                "TransformationType"
              ]
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": "logs:GetLogEvents",
          "Resource": "arn:aws:logs:*:*:log-group:/aws/ecs/AWSTransform*:log-stream:*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ecr:CreateRepository",
            "ecr:TagResource"
          ],
          "Resource": "arn:aws:ecr:*:*:repository/awstransform*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "aws:RequestTag/CreatedBy": "AWSTransform"
            },
            "ForAllValues:StringEquals": {
              "aws:TagKeys": [
                "ResourceName",
                "CreatedBy",
                "TransformationType"
              ]
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ecs:DescribeClusters",
            "ecs:DescribeServices",
            "ec2:DescribeSecurityGroups",
            "ec2:DescribeNetworkInterfaces",
            "logs:DescribeLogGroups",
            "logs:DescribeLogStreams",
            "logs:ListTagsForResource"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "iam:CreateServiceLinkedRole"
          ],
          "Resource": "arn:aws:iam::*:role/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS",
          "Condition": {
            "StringEquals": {
              "iam:AWSServiceName": "ecs.amazonaws.com"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "kms:CreateGrant"
          ],
          "Resource": "arn:aws:kms:*:*:key/*",
          "Condition": {
            "Bool": {
              "kms:GrantIsForAWSResource": "true"
            },
            "StringLike": {
              "kms:ViaService": [
                "ecr.*.amazonaws.com"
              ],
              "kms:EncryptionContext:aws:ecr:arn": "*"
            },
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}",
              "kms:GrantConstraintType": "EncryptionContextSubset"
            },
            "ForAllValues:StringEquals": {
              "kms:GrantOperations": [
                "Decrypt",
                "GenerateDataKey"
              ]
            }
          }
        }
      ]
    },
    "VersionId": "v7",
    "IsDefaultVersion": true,
    "CreateDate": "2026-09-11T00:27:08+00:00"
  }
}

Version History (6 recorded)

Raw history
v7updated

2 actions added

cea3854

AWSTransformApplicationECSDeploymentPolicy - Policy Version v6

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

Mar 12, 2026

3d7845f

AWSTransformApplicationECSDeploymentPolicy - Policy Version v6

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

Feb 12, 2026

498ca46

AWSTransformApplicationECSDeploymentPolicy - Policy Version v4

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

Feb 12, 2026

01ea49a

AWSTransformApplicationECSDeploymentPolicy - Policy Version v2

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

Nov 24, 2025

10e9200

AWSTransformApplicationECSDeploymentPolicy - Policy Version v1

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

Sep 30, 2025

0c51abc