Skip to content

Commit

Permalink
allow lambda to interact with dynamodb tables
Browse files Browse the repository at this point in the history
  • Loading branch information
lbernhard95 committed Oct 30, 2024
1 parent 6841fb9 commit 07ff7db
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions infrastructure/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,28 @@ resource "aws_iam_policy" "schafkopf_scheduler" {
Action = "logs:PutLogEvents"
Resource = "*"
},
{
"Effect": "Allow",
"Action": [
"dynamodb:BatchGetItem",
"dynamodb:DescribeTable",
"dynamodb:GetItem",
"dynamodb:Query",
"dynamodb:Scan"
],
"Resource": [
aws_dynamodb_table.emails.arn,
aws_dynamodb_table.polls.arn
]
},
{
"Effect": "Allow",
"Action": [
"dynamodb:PutItem",
"dynamodb:UpdateItem",
],
"Resource": aws_dynamodb_table.polls.arn
}
]
})
}
Expand Down

0 comments on commit 07ff7db

Please sign in to comment.