Deprecated

Removed from AWS on 2022-02-10 - Active for 1 year, 2 months

AmazonLambdaRolePolicyForLaunchWizardSAP

Last Modified

Dec 4, 2020

December 4, 2020 at 04:50 PM UTC

Version

v5

Total Versions

5

Created

Dec 4, 2020

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 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.

    • ssm-002ssm:SendCommandscoped
      • ssm:SendCommand (via ssm:sendCommand): on arn:aws:ssm:*:*:document/AWS-RunShellScript

    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:CreateRoute",
            "ec2:DeleteRoute"
          ],
          "Resource": "arn:aws:ec2:*:*:route-table/*",
          "Condition": {
            "StringLike": {
              "ec2:ResourceTag/LaunchWizardApplicationType": "*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ec2:CreateTags"
          ],
          "Resource": "*",
          "Condition": {
            "StringLike": {
              "ec2:ResourceTag/LaunchWizardApplicationType": "*"
            },
            "ForAllValues:StringLike": {
              "aws:TagKeys": "LaunchWizard*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ssm:GetParameter"
          ],
          "Resource": "arn:aws:ssm:*:*:parameter/LaunchWizard*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "ssm:GetDocument",
            "ssm:sendCommand"
          ],
          "Resource": [
            "arn:aws:ssm:*:*:document/AWS-RunShellScript"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "ssm:SendCommand"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:instance/*"
          ],
          "Condition": {
            "StringLike": {
              "ssm:resourceTag/LaunchWizardApplicationType": "*"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ssm:ListCommands",
            "ec2:DescribeVpcs",
            "ec2:DescribeRouteTables",
            "ec2:DescribeInstances",
            "ec2:DescribeTags",
            "ec2:DescribeInstanceAttribute",
            "ec2:ModifyInstanceAttribute"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:ListBucket",
            "s3:ListBucketVersions",
            "s3:GetObject",
            "s3:GetObjectVersion",
            "s3:GetObjectVersionAcl",
            "s3:PutObject",
            "s3:PutObjectTagging",
            "s3:DeleteObject",
            "s3:DeleteObjectVersion",
            "s3:DeleteBucket"
          ],
          "Resource": [
            "arn:aws:s3:::launchwizard*"
          ]
        }
      ]
    },
    "VersionId": "v5",
    "IsDefaultVersion": true,
    "CreateDate": "2020-12-04T16:00:56Z"
  }
}

Version History (5 recorded)

Raw history

Update detected

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

Dec 4, 2020

c6781d6

Update detected

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

Jul 1, 2020

368d99e

Update detected

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

Jun 3, 2020

25fe43d

Update detected

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

Jun 3, 2020

8e604c2

Update detected

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

Mar 30, 2020

a8f90da