AmazonECSInfrastructureRolePolicyForManagedInstances

Last Modified

Sep 15, 2026

September 15, 2026 at 06:03 PM UTC

Version

v12

Total Versions

6

Created

Sep 15, 2026

Actions

26

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 iam:PassedToService, on arn:aws:iam::*:role/ecsInstanceRole*

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

    • ec2-004ec2:CreateLaunchTemplateVersion + ec2:ModifyLaunchTemplatescoped
      • ec2:CreateLaunchTemplateVersion: condition ec2:ManagedResourceOperator, on arn:aws:ec2:*:*:launch-template/*
      • ec2:ModifyLaunchTemplate: condition ec2:ManagedResourceOperator, on arn:aws:ec2:*:*:launch-template/*
    • ec2-005ec2:CreateLaunchTemplateVersion + ec2:ModifyLaunchTemplatescoped
      • ec2:CreateLaunchTemplateVersion: condition ec2:ManagedResourceOperator, on arn:aws:ec2:*:*:launch-template/*
      • ec2:ModifyLaunchTemplate: condition ec2:ManagedResourceOperator, on arn:aws:ec2:*:*:launch-template/*

    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": "CreateLaunchTemplateForManagedInstances",
          "Effect": "Allow",
          "Action": [
            "ec2:CreateLaunchTemplate"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:launch-template/*"
          ],
          "Condition": {
            "StringEquals": {
              "aws:RequestTag/AmazonECSManaged": "true"
            }
          }
        },
        {
          "Sid": "CreateLaunchTemplateVersionsForManagedInstances",
          "Effect": "Allow",
          "Action": [
            "ec2:CreateLaunchTemplateVersion",
            "ec2:ModifyLaunchTemplate"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:launch-template/*"
          ],
          "Condition": {
            "StringEquals": {
              "ec2:ManagedResourceOperator": "ecs.amazonaws.com"
            }
          }
        },
        {
          "Sid": "ProvisionEC2InstancesForManagedInstances",
          "Effect": "Allow",
          "Action": [
            "ec2:CreateFleet"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:fleet/*",
            "arn:aws:ec2:*:*:instance/*",
            "arn:aws:ec2:*:*:network-interface/*",
            "arn:aws:ec2:*:*:volume/*"
          ],
          "Condition": {
            "StringEquals": {
              "aws:RequestTag/AmazonECSManaged": "true"
            }
          }
        },
        {
          "Sid": "CreateFleetForSupportingResources",
          "Effect": "Allow",
          "Action": [
            "ec2:CreateFleet"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:subnet/*",
            "arn:aws:ec2:*:*:security-group/*",
            "arn:aws:ec2:*::image/*"
          ]
        },
        {
          "Sid": "CreateFleetForECSManagedLaunchTemplates",
          "Effect": "Allow",
          "Action": [
            "ec2:CreateFleet"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:launch-template/*"
          ],
          "Condition": {
            "StringEquals": {
              "ec2:ResourceTag/AmazonECSManaged": "true"
            }
          }
        },
        {
          "Sid": "RunInstancesForManagedInstances",
          "Effect": "Allow",
          "Action": [
            "ec2:RunInstances"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:instance/*",
            "arn:aws:ec2:*:*:volume/*",
            "arn:aws:ec2:*:*:network-interface/*"
          ],
          "Condition": {
            "StringEquals": {
              "aws:RequestTag/AmazonECSManaged": "true"
            }
          }
        },
        {
          "Sid": "RunInstancesForECSManagedLaunchTemplates",
          "Effect": "Allow",
          "Action": [
            "ec2:RunInstances"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:launch-template/*"
          ],
          "Condition": {
            "StringEquals": {
              "ec2:ResourceTag/AmazonECSManaged": "true"
            }
          }
        },
        {
          "Sid": "RunInstancesForSupportingResources",
          "Effect": "Allow",
          "Action": [
            "ec2:RunInstances"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:subnet/*",
            "arn:aws:ec2:*:*:security-group/*",
            "arn:aws:ec2:*::image/*",
            "arn:aws:resource-groups:*:*:group/*"
          ]
        },
        {
          "Sid": "TagOnCreateEC2ResourcesForManagedInstances",
          "Effect": "Allow",
          "Action": [
            "ec2:CreateTags"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:fleet/*",
            "arn:aws:ec2:*:*:launch-template/*",
            "arn:aws:ec2:*:*:network-interface/*",
            "arn:aws:ec2:*:*:instance/*",
            "arn:aws:ec2:*:*:volume/*"
          ],
          "Condition": {
            "StringEquals": {
              "ec2:CreateAction": [
                "CreateFleet",
                "CreateLaunchTemplate",
                "RunInstances"
              ]
            }
          }
        },
        {
          "Sid": "PassInstanceRoleForManagedInstances",
          "Effect": "Allow",
          "Action": [
            "iam:PassRole"
          ],
          "Resource": [
            "arn:aws:iam::*:role/ecsInstanceRole*"
          ],
          "Condition": {
            "StringLike": {
              "iam:PassedToService": "ec2.*"
            }
          }
        },
        {
          "Sid": "CreateServiceLinkedRoleForEC2Spot",
          "Effect": "Allow",
          "Action": [
            "iam:CreateServiceLinkedRole"
          ],
          "Resource": [
            "arn:aws:iam::*:role/aws-service-role/spot.amazonaws.com/AWSServiceRoleForEC2Spot"
          ]
        },
        {
          "Sid": "DescribeEC2ResourcesManagedByECS",
          "Effect": "Allow",
          "Action": [
            "ec2:DescribeInstances",
            "ec2:DescribeInstanceTypes",
            "ec2:DescribeLaunchTemplates",
            "ec2:DescribeNetworkInterfaces",
            "ec2:DescribeInstanceTypeOfferings",
            "ec2:DescribeAvailabilityZones",
            "ec2:DescribeSecurityGroups",
            "ec2:DescribeSubnets",
            "ec2:DescribeVpcs",
            "ec2:DescribeCapacityReservations"
          ],
          "Resource": "*"
        },
        {
          "Sid": "ListResourceGroupResources",
          "Effect": "Allow",
          "Action": [
            "resource-groups:ListGroupResources",
            "cloudformation:DescribeStacks",
            "cloudformation:ListStackResources",
            "tag:GetResources"
          ],
          "Resource": "*"
        }
      ]
    },
    "VersionId": "v12",
    "IsDefaultVersion": true,
    "CreateDate": "2026-09-15T17:57:08+00:00"
  }
}

Version History (9 recorded)

Raw history
v12updated

scope changed, no action added or removed

4197142

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v11

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

Mar 12, 2026

7e3b59a

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v11

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

Feb 26, 2026

e0b9de2

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v10

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

Feb 24, 2026

b655591

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v9

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

Feb 12, 2026

2401c8e

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v6

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

Feb 12, 2026

609353b

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v3

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

Dec 16, 2025

884d90f

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v2

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

Sep 30, 2025

fc2cbbe

AmazonECSInfrastructureRolePolicyForManagedInstances - Policy Version v1

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

Sep 29, 2025

ac26a1a