Skip to content

Commit 821d5ce

Browse files
Fix endponit lambda configuration
1 parent 7764198 commit 821d5ce

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

infrastructure/terraform/modules/lambda-function/lambda_function_main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ resource "aws_lambda_function" "main" {
66
source_code_hash = var.source_code_hash
77
handler = var.handler
88
runtime = var.runtime
9+
10+
environment {
11+
variables = var.environment_variables
12+
}
913
}

infrastructure/terraform/modules/templates-api/module_endpoint_lambda.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ module "endpoint_lambda" {
1313
environment_variables = {
1414
TEMPLATES_TABLE_NAME = aws_dynamodb_table.templates.name
1515
}
16+
17+
execution_role_policy_document = data.aws_iam_policy_document.endpoint_lambda_dynamo_access.json
1618
}
1719

1820

0 commit comments

Comments
 (0)