Skip to content

Instantly share code, notes, and snippets.

@scholtenmartijn
Created May 30, 2016 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scholtenmartijn/c4449e3d79f0263e0a124c677f862ae1 to your computer and use it in GitHub Desktop.
Save scholtenmartijn/c4449e3d79f0263e0a124c677f862ae1 to your computer and use it in GitHub Desktop.
Role for AWS Lambda to enable deletion of certain S3 buckets and Route 53 record sets
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1463056305000",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:DeleteBucket",
"s3:ListObjects",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::*.yourdomain.com",
"arn:aws:s3:::*.yourdomain.com/*"
]
},
{
"Sid": "Stmt1463056425000",
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment