Skip to content

Instantly share code, notes, and snippets.

@neverendingqs
Last active August 17, 2018 01:37
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 neverendingqs/483983b384e8b0ebcd85284cbc603786 to your computer and use it in GitHub Desktop.
Save neverendingqs/483983b384e8b0ebcd85284cbc603786 to your computer and use it in GitHub Desktop.
2017/09/24/aws-lambda-notprincipal - workingexample.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyObjectDeleteWithWhitelist",
"Effect": "Deny",
"NotPrincipal": {
"AWS": [
"arn:aws:iam::123456789012:role/my-lambda-role",
"arn:aws:sts::123456789012:assumed-role/my-lambda-role/my-lambda-function"
]
},
"Action": "s3:DeleteObject",
"Resource": "arn:aws:s3:::mybucket/*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment