File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,25 @@ resource "aws_lambda_function_url" "scan_files" {
105105 qualifier = each. key == " api-provisioned" ? aws_lambda_alias. api_provisioned_latest . name : null
106106}
107107
108+ resource "aws_lambda_permission" "scan_files_invoke_function_url" {
109+ for_each = toset (local. scan_files_api_functions )
110+
111+ statement_id = " AllowPublicInvokeFunctionUrl-${ each . key } "
112+ action = " lambda:InvokeFunctionUrl"
113+ function_name = module. scan_files [each . key ]. function_name
114+ function_url_auth_type = " NONE"
115+ principal = " *"
116+ }
117+
118+ resource "aws_lambda_permission" "scan_files_invoke_function" {
119+ for_each = toset (local. scan_files_api_functions )
120+
121+ statement_id = " AllowPublicInvokeFunction-${ each . key } "
122+ action = " lambda:InvokeFunction"
123+ function_name = module. scan_files [each . key ]. function_name
124+ principal = " *"
125+ }
126+
108127#
109128# Setup provisioned concurency for the api-provisioned lambda
110129# This function will be used for synchronous requests
You can’t perform that action at this time.
0 commit comments