Invokes an AWS Lambda function with static input values and outputs a specific result entry.

Terraform Template

resource "aws_lambda_invocation" "example" {
  function_name = "aws_lambda_function.lambda_function_test.function_name"
  input = jsonencode({
 key1 = "value1"
 key2 = "value2"
 })
}

output "result_entry" {
  value = jsondecode(aws_lambda_invocation.example.result)["key1"]
}