From b83009148834e2ca7d51ce726fa904f9853d9a0d Mon Sep 17 00:00:00 2001 From: Florian Rumiel Date: Sun, 25 Feb 2024 11:33:45 -0500 Subject: [PATCH] Update lambda permission statement_id to include API Gateway path and HTTP method --- terraform/modules/api_gateway/lambda_integration/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/modules/api_gateway/lambda_integration/main.tf b/terraform/modules/api_gateway/lambda_integration/main.tf index d149fa6..7e90fb7 100644 --- a/terraform/modules/api_gateway/lambda_integration/main.tf +++ b/terraform/modules/api_gateway/lambda_integration/main.tf @@ -31,7 +31,7 @@ resource "aws_api_gateway_integration" "api_gateway_integration" { } resource "aws_lambda_permission" "lambda_permission" { - statement_id = "AllowExecutionFromAPIGateway-${var.lambda_function_name}" + statement_id = "AllowExecutionFromAPIGateway-${var.lambda_function_name}-${var.api_gateway_path_part}-${var.api_gateway_http_method}" action = "lambda:InvokeFunction" function_name = var.lambda_function_name principal = "apigateway.amazonaws.com"