Last active
March 7, 2024 16:58
-
-
Save haku-d/a182e04a62e0a9a360577d8c39108a5c to your computer and use it in GitHub Desktop.
AWS policy statement grants sufficient permissions to AWS SAM CLI
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": "CloudFormationTemplate", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "cloudformation:CreateChangeSet" | |
| ], | |
| "Resource": [ | |
| "arn:aws:cloudformation:*:aws:transform/Serverless-2016-10-31" | |
| ] | |
| }, | |
| { | |
| "Sid": "CloudFormationStack", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "cloudformation:CreateChangeSet", | |
| "cloudformation:CreateStack", | |
| "cloudformation:DeleteStack", | |
| "cloudformation:DescribeChangeSet", | |
| "cloudformation:DescribeStackEvents", | |
| "cloudformation:DescribeStacks", | |
| "cloudformation:ExecuteChangeSet", | |
| "cloudformation:GetTemplateSummary", | |
| "cloudformation:ListStackResources", | |
| "cloudformation:UpdateStack" | |
| ], | |
| "Resource": [ | |
| "arn:aws:cloudformation:*:111122223333:stack/*" | |
| ] | |
| }, | |
| { | |
| "Sid": "S3", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:CreateBucket", | |
| "s3:GetObject", | |
| "s3:PutObject" | |
| ], | |
| "Resource": [ | |
| "arn:aws:s3:::*/*" | |
| ] | |
| }, | |
| { | |
| "Sid": "ECRRepository", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ecr:BatchCheckLayerAvailability", | |
| "ecr:BatchGetImage", | |
| "ecr:CompleteLayerUpload", | |
| "ecr:CreateRepository", | |
| "ecr:DeleteRepository", | |
| "ecr:DescribeImages", | |
| "ecr:DescribeRepositories", | |
| "ecr:GetDownloadUrlForLayer", | |
| "ecr:GetRepositoryPolicy", | |
| "ecr:InitiateLayerUpload", | |
| "ecr:ListImages", | |
| "ecr:PutImage", | |
| "ecr:SetRepositoryPolicy", | |
| "ecr:UploadLayerPart" | |
| ], | |
| "Resource": [ | |
| "arn:aws:ecr:*:111122223333:repository/*" | |
| ] | |
| }, | |
| { | |
| "Sid": "ECRAuthToken", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "ecr:GetAuthorizationToken" | |
| ], | |
| "Resource": [ | |
| "*" | |
| ] | |
| }, | |
| { | |
| "Sid": "Lambda", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "lambda:AddPermission", | |
| "lambda:CreateFunction", | |
| "lambda:DeleteFunction", | |
| "lambda:GetFunction", | |
| "lambda:GetFunctionConfiguration", | |
| "lambda:ListTags", | |
| "lambda:RemovePermission", | |
| "lambda:TagResource", | |
| "lambda:UntagResource", | |
| "lambda:UpdateFunctionCode", | |
| "lambda:UpdateFunctionConfiguration" | |
| ], | |
| "Resource": [ | |
| "arn:aws:lambda:*:111122223333:function:*" | |
| ] | |
| }, | |
| { | |
| "Sid": "IAM", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iam:CreateRole", | |
| "iam:AttachRolePolicy", | |
| "iam:DeleteRole", | |
| "iam:DetachRolePolicy", | |
| "iam:GetRole", | |
| "iam:TagRole" | |
| ], | |
| "Resource": [ | |
| "arn:aws:iam::111122223333:role/*" | |
| ] | |
| }, | |
| { | |
| "Sid": "IAMPassRole", | |
| "Effect": "Allow", | |
| "Action": "iam:PassRole", | |
| "Resource": "*", | |
| "Condition": { | |
| "StringEquals": { | |
| "iam:PassedToService": "lambda.amazonaws.com" | |
| } | |
| } | |
| }, | |
| { | |
| "Sid": "APIGateway", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "apigateway:DELETE", | |
| "apigateway:GET", | |
| "apigateway:PATCH", | |
| "apigateway:POST", | |
| "apigateway:PUT" | |
| ], | |
| "Resource": [ | |
| "arn:aws:apigateway:*::*" | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment