forked from leonid-zats/JavaVulnerableLabE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lambda.tf
20 lines (15 loc) · 607 Bytes
/
lambda.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
resource "aws_lambda_permission" "apigw" {
statement_id = "AllowAPIGatewayInvoke"
action = "lambda:InvokeFunction"
function_name = aws_lambda_function.example.function_name
principal = "apigateway.amazonaws.com"
# The "/*/*" portion grants access from any method on any resource
# within the API Gateway REST API.
source_arn = "${aws_api_gateway_rest_api.example.execution_arn}/*/*"
}
resource "aws_lambda_function" "example" {
function_name = "ServerlessPerson"
handler = "MyHandler::handleRequest"
runtime = "java11"
role = aws_iam_role.lambda_exec.arn
}