Data Source: aws_lambda_invocation

Use this data source to invoke custom lambda functions as data source. The lambda function is invoked with RequestResponse invocation type.

Example Usage

data "aws_lambda_invocation" "example" {
  function_name = aws_lambda_function.lambda_function_test.function_name

  input = <<JSON
{
  "key1": "value1",
  "key2": "value2"
}
JSON
}

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

Argument Reference

Attribute Reference

This data source exports the following attributes in addition to the arguments above: