Created
February 15, 2021 09:40
-
-
Save mf-contino/ac999057024242e2574dd7acad497efa to your computer and use it in GitHub Desktop.
cf-dynamo-db-scan-policy
This file contains 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "An IAM Policy that only allows scan access to a specified DynamoDB table", | |
"Parameters": { | |
"TableArn": { | |
"Description": "ARN of the DynamoDB table to allow access to", | |
"Type": "String" | |
}, | |
"NamePrefix": { | |
"Description": "Prefix to attach to the policy name", | |
"Type": "String" | |
} | |
}, | |
"Resources": { | |
"IAMPolicy": { | |
"Type": "AWS::IAM::ManagedPolicy", | |
"Properties": { | |
"ManagedPolicyName": { | |
"Fn::Sub" : [ "${Prefix}-DynamoDBScannerPolicy", { "Prefix": {"Ref": "NamePrefix"}}] | |
}, | |
"PolicyDocument": { | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"dynamodb:Scan" | |
], | |
"Resource": { | |
"Ref": "TableArn" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment