Last active
June 2, 2023 14:39
-
-
Save wheller/c261c1f0c119f03a652fba19d9522ca6 to your computer and use it in GitHub Desktop.
An AWS Policy granting the access required to bootstrap the AWS CDK in any region.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "CloudFormationStacks", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "cloudformation:CreateChangeSet", | |
| "cloudformation:DescribeChangeSet", | |
| "cloudformation:DescribeStackEvents", | |
| "cloudformation:DescribeStacks", | |
| "cloudformation:ExecuteChangeSet" | |
| ], | |
| "Resource": "arn:aws:cloudformation:*:*:stack/CDKToolkit/*" | |
| }, | |
| { | |
| "Sid": "S3CDKBucket", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:CreateBucket", | |
| "s3:GetBucketPublicAccessBlock", | |
| "s3:GetBucketPolicy", | |
| "s3:GetBucketVersioning", | |
| "s3:GetEncryptionConfiguration", | |
| "s3:PutBucketPolicy", | |
| "s3:PutBucketPublicAccessBlock", | |
| "s3:PutBucketVersioning", | |
| "s3:PutEncryptionConfiguration" | |
| ], | |
| "Resource": "arn:aws:s3:::cdk-*" | |
| }, | |
| { | |
| "Sid": "CreateRoles", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iam:AttachRolePolicy", | |
| "iam:CreateRole", | |
| "iam:GetRole", | |
| "iam:GetRolePolicy", | |
| "iam:ListRoleTags", | |
| "iam:PutRolePolicy", | |
| "iam:TagRole" | |
| ], | |
| "Resource": "arn:aws:iam::*:role/cdk-*" | |
| }, | |
| { | |
| "Sid": "ECRCreateRepository", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ecr:CreateRepository" | |
| ], | |
| "Resource": "*" | |
| }, | |
| { | |
| "Sid": "ECRRepository", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ecr:DescribeRepositories", | |
| "ecr:SetRepositoryPolicy" | |
| ], | |
| "Resource": "arn:aws:ecr:*:*:repository/cdk-*" | |
| }, | |
| { | |
| "Sid": "SystemsManager", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ssm:GetParameters", | |
| "ssm:PutParameter" | |
| ], | |
| "Resource": "arn:aws:ssm:*:*:parameter/cdk-bootstrap/*" | |
| }, | |
| { | |
| "Sid": "DeleteRolesOnlyRequiredToRollbackIfFailed", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iam:DeleteRole", | |
| "iam:DeleteRolePolicy", | |
| "iam:DetachRolePolicy" | |
| ], | |
| "Resource": "arn:aws:iam::*:role/cdk-*" | |
| }, | |
| { | |
| "Sid": "DeleteECROnlyRequiredToRollbackIfFailed", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ecr:DeleteRepository" | |
| ], | |
| "Resource": "arn:aws:ecr:*:*:repository/cdk-*" | |
| } | |
| ] | |
| } |
and "ssm:GetParameter" (without end 's')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
necesary add ecr:PutLifecyclePolicy