Created
June 23, 2020 17:08
-
-
Save jsonw23/6cca46d1f6df6686f0383aa3d0b399c6 to your computer and use it in GitHub Desktop.
Add an IAM policy so the DynamoDB table can be scanned
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
Resources: | |
HelloWorldFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
CodeUri: hello_world/ | |
Handler: app.lambda_handler | |
Runtime: python3.8 | |
Environment: | |
Variables: | |
TABLE_NAME: !Ref MyTable | |
# grant permission to the table using a policy template | |
Policies: | |
- DynamoDBReadPolicy | |
TableName: !Ref MyTable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment