Skip to content

Instantly share code, notes, and snippets.

@dgomesbr
Created July 6, 2020 05:23
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 dgomesbr/07102fc5e94f085dcfff3fc02f93f9e8 to your computer and use it in GitHub Desktop.
Save dgomesbr/07102fc5e94f085dcfff3fc02f93f9e8 to your computer and use it in GitHub Desktop.
Sample DynamoDB policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:Query"
],
"Resource": [
"arn:aws:dynamodb:<YOUR_REGION>:<YOUR_AWS_ACCOUNT_ID>:table/<YOUR DYNAMODB_TABLE>"
],
"Condition": {
"ForAllValues:StringEquals": {
"dynamodb:LeadingKeys": [
"${cognito-identity.amazonaws.com:sub}"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment