From cfda93febd584ce2707d5814df7e5cf086376865 Mon Sep 17 00:00:00 2001 From: ribeirogab Date: Sat, 21 Sep 2024 20:09:09 -0300 Subject: [PATCH] feat: update dynamodb permissions for lambda execution --- infra/lambda/main.tf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infra/lambda/main.tf b/infra/lambda/main.tf index 285d3c5..64081ff 100644 --- a/infra/lambda/main.tf +++ b/infra/lambda/main.tf @@ -125,8 +125,11 @@ resource "aws_iam_role" "lambda_exec_role" { "dynamodb:Query", "dynamodb:Scan" ] - Effect = "Allow" - Resource = "${aws_dynamodb_table.auth_resource_table.arn}" + Effect = "Allow" + Resource = [ + "${aws_dynamodb_table.auth_resource_table.arn}", + "${aws_dynamodb_table.auth_resource_table.arn}/index/ReferenceIdIndex" + ] }, { Action = [