Created
July 7, 2021 18:19
-
-
Save bahrmichael/213f16d179ea6cdcc000eb0bf6761405 to your computer and use it in GitHub Desktop.
An IAM statement which allows the Query operation on a "EventsTable" and a GSI called "eventIdIndex"
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
{ | |
Effect: 'Allow', | |
Action: ['dynamodb:Query'], | |
Resource: [ | |
// assuming a table "EventsTable" with a GSI called "eventIdIndex" | |
{'Fn::GetAtt': ['EventsTable', 'Arn']}, | |
{'Fn::Join': [ '/', [{ 'Fn::GetAtt': ['EventsTable', 'Arn' ] }, 'index', 'eventIdIndex' ]]} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment