Skip to content

Commit

Permalink
Update lambda permission statement_id to include API Gateway path and…
Browse files Browse the repository at this point in the history
… HTTP method
  • Loading branch information
FloRul committed Feb 25, 2024
1 parent 2faa654 commit b830091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/modules/api_gateway/lambda_integration/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b830091

Please sign in to comment.