Skip to content

Instantly share code, notes, and snippets.

@restump
Last active August 12, 2020 22:34
Show Gist options
  • Save restump/5703239277d1f608f66f3cae5002547b to your computer and use it in GitHub Desktop.
Save restump/5703239277d1f608f66f3cae5002547b to your computer and use it in GitHub Desktop.
AWS IAM permissions to restrict sensitive data resources
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RestrictSensitiveDataReadActions",
"Action": [
"cloudformation:GetTemplate",
"dynamodb:GetItem",
"dynamodb:BatchGetItem",
"dynamodb:Query",
"dynamodb:Scan",
"ec2:GetConsoleOutput",
"ec2:GetConsoleScreenshot",
"ecr:BatchGetImage",
"ecr:GetAuthorizationToken",
"ecr:GetDownloadUrlForLayer",
"kinesis:Get*",
"lambda:GetFunction",
"logs:GetLogEvents",
"s3:GetObject",
"sdb:Select*",
"sqs:ReceiveMessage",
"ssm:Get*"
],
"Effect": "Deny",
"Resource": "*"
},
{
"Sid": "RestrictApiGatewaySensitiveDataReadActions",
"Action": [
"apigateway:GET"
],
"Effect": "Deny",
"Resource": [
"arn:aws:apigateway:*::/apikeys",
"arn:aws:apigateway:*::/apikeys/*",
"arn:aws:apigateway:*::/clientcertificates",
"arn:aws:apigateway:*::/clientcertificates/*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment