Created
October 31, 2018 05:45
-
-
Save monkut/1762492d93ec498755094ec57ac08b5d to your computer and use it in GitHub Desktop.
A minimal Zappa attach policy with bucket access
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": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"iam:GetRole", | |
"iam:PutRolePolicy" | |
], | |
"Resource": [ | |
"*" | |
] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"iam:PassRole" | |
], | |
"Resource": [ | |
"arn:aws:iam::${ACCOUNT_ID}:role/${EXECUTION_ROLE_NAME}" | |
] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"apigateway:DELETE", | |
"apigateway:GET", | |
"apigateway:PATCH", | |
"apigateway:POST", | |
"apigateway:PUT", | |
"events:DeleteRule", | |
"events:DescribeRule", | |
"events:ListRules", | |
"events:ListTargetsByRule", | |
"events:PutTargets", | |
"events:RemoveTargets", | |
"lambda:AddPermission", | |
"lambda:CreateFunction", | |
"lambda:DeleteFunction", | |
"lambda:GetFunction", | |
"lambda:ListVersionsByFunction", | |
"lambda:UpdateFunctionCode", | |
"lambda:UpdateFunctionConfiguration", | |
"cloudformation:CreateStack", | |
"cloudformation:DeleteStack", | |
"cloudformation:DescribeStackResource", | |
"cloudformation:DescribeStacks", | |
"cloudformation:ListStackResources", | |
"cloudformation:UpdateStack", | |
"logs:DescribeLogStreams", | |
"logs:FilterLogEvents", | |
"route53:ListHostedZones", | |
"route53:ChangeResourceRecordSets", | |
"route53:GetHostedZone" | |
], | |
"Resource": [ | |
"*" | |
] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListBucket" | |
], | |
"Resource": [ | |
"arn:aws:s3:::${SOURCE_BUCKET_NAME}", | |
"arn:aws:s3:::${INTERMEDIATE_BUCKET_NAME}" | |
] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:DeleteObject", | |
"s3:GetObject", | |
"s3:PutObject", | |
"s3:CreateMultipartUpload", | |
"s3:AbortMultipartUpload", | |
"s3:ListMultipartUploadParts", | |
"s3:ListBucketMultipartUploads" | |
], | |
"Resource": [ | |
"arn:aws:s3:::${SOURCE_BUCKET_NAME}/*", | |
"arn:aws:s3:::${INTERMEDIATE_BUCKET_NAME}/*" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment