Configures a Lambda function to send invocation results to specific AWS services on success or failure.

Terraform Template

resource "aws_lambda_function_event_invoke_config" "example" {

  destination_config {

    on_failure {
      destination = "aws_sqs_queue.example.arn"
    }

    on_success {
      destination = "aws_sns_topic.example.arn"
    }
  }
  function_name = "aws_lambda_alias.example.function_name"
}