Skip to content

Commit 4454d0c

Browse files
authored
fix: API Lambda function permissions (#84)
Update the API's Lambda function permissions to include `lambda:InvokeFunction`. This is a recent change from AWS requiring public function URLs to include both the `lambda:InvokeFunctionUrl` and `lambda:InvokeFunction` actions.
1 parent 1216cf5 commit 4454d0c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

terragrunt/aws/api/lambda.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,18 @@ resource "aws_lambda_function_url" "api" {
2020
function_name = module.api.function_name
2121
authorization_type = "NONE"
2222
}
23+
24+
resource "aws_lambda_permission" "api_invoke_function_url" {
25+
statement_id = "AllowInvokeFunctionUrl"
26+
action = "lambda:InvokeFunctionUrl"
27+
function_name = module.api.function_name
28+
function_url_auth_type = "NONE"
29+
principal = "*"
30+
}
31+
32+
resource "aws_lambda_permission" "api_invoke_function" {
33+
statement_id = "AllowInvokeFunction"
34+
action = "lambda:InvokeFunction"
35+
function_name = module.api.function_name
36+
principal = "*"
37+
}

0 commit comments

Comments
 (0)