AWSCloud9ServiceRolePolicy

Last Modified

Sep 4, 2026

September 4, 2026 at 12:03 AM UTC

Version

v9

Total Versions

14

Created

Sep 3, 2026

Actions

24

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 2 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 iam:PassedToService, on arn:aws:iam::*:role/service-role/AWSCloud9SSMAccessRole
    • ec2-001iam:PassRole + ec2:RunInstancesscoped
      • iam:PassRole: condition iam:PassedToService, on arn:aws:iam::*:role/service-role/AWSCloud9SSMAccessRole

    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": [
        {
          "Effect": "Allow",
          "Action": [
            "ec2:RunInstances",
            "ec2:CreateSecurityGroup",
            "ec2:DescribeVpcs",
            "ec2:DescribeSubnets",
            "ec2:DescribeSecurityGroups",
            "ec2:DescribeInstances",
            "ec2:DescribeInstanceStatus",
            "cloudformation:CreateStack",
            "cloudformation:DescribeStacks",
            "cloudformation:DescribeStackEvents",
            "cloudformation:DescribeStackResources",
            "ec2:TerminateInstances",
            "ec2:DeleteSecurityGroup",
            "ec2:AuthorizeSecurityGroupIngress"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "cloudformation:DeleteStack"
          ],
          "Resource": "arn:aws:cloudformation:*:*:stack/aws-cloud9-*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "ec2:CreateTags"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:instance/*",
            "arn:aws:ec2:*:*:security-group/*"
          ],
          "Condition": {
            "StringLike": {
              "aws:RequestTag/Name": "aws-cloud9-*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ec2:StartInstances",
            "ec2:StopInstances"
          ],
          "Resource": "*",
          "Condition": {
            "StringLike": {
              "ec2:ResourceTag/aws:cloudformation:stack-name": "aws-cloud9-*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ec2:StartInstances",
            "ec2:StopInstances"
          ],
          "Resource": [
            "arn:aws:license-manager:*:*:license-configuration:*"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "iam:ListInstanceProfiles",
            "iam:GetInstanceProfile"
          ],
          "Resource": [
            "arn:aws:iam::*:instance-profile/cloud9/*"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "iam:PassRole"
          ],
          "Resource": [
            "arn:aws:iam::*:role/service-role/AWSCloud9SSMAccessRole"
          ],
          "Condition": {
            "StringLike": {
              "iam:PassedToService": "ec2.amazonaws.com"
            }
          }
        },
        {
          "Sid": "CloudFormationTagOnCreate",
          "Effect": "Allow",
          "Action": [
            "cloudformation:TagResource"
          ],
          "Resource": "*",
          "Condition": {
            "StringEquals": {
              "cloudformation:CreateAction": [
                "CreateStack"
              ]
            }
          }
        }
      ]
    },
    "VersionId": "v9",
    "IsDefaultVersion": true,
    "CreateDate": "2026-09-03T23:17:07+00:00"
  }
}

Version History (17 recorded)

Raw history
v9updated

1 action added

a755968

AWSCloud9ServiceRolePolicy - Policy Version v8

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

Mar 12, 2026

f75a8d6

Update detected

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

Sep 18, 2024

aafbae9

Update detected

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

May 13, 2024

1b36617

Update detected

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

Jan 17, 2022

7dedbc1

Update detected

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

Oct 6, 2020

18f5a64

Update detected

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

Oct 6, 2020

b67c353

Update detected

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

Jul 2, 2020

31b9515

Update detected

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

May 7, 2020

420820d

Update detected

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

Mar 16, 2020

e08c942

Update detected

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

Jan 8, 2020

56b8f6a

Update detected

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

Sep 16, 2019

49aa1d0

Update detected

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

Sep 16, 2019

71619cf

Update detected

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

Sep 16, 2019

8279033

`2019-08-29`

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

Aug 29, 2019

5016d52

I updated my CLI and it looks like it reordered everything and changed the white-space, so everything looks changed, but is not

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

Jul 12, 2019

9d2dff1

First commit

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

Feb 10, 2019

ad4c2e8