Posted On: Jan 6, 2020
We now support Destinations for asynchronous invocations on Amazon Lambda, a new feature that allows you to gain visibility to asynchronous invocation result and route the result to an Amazon Web Services service without writing code.
Today, when you invoke a function asynchronously, Lambda sends the event to a queue. A separate process reads events from the queue and runs your function. When the event is added to the queue, Lambda returns a status code to acknowledge that the queue has received this event. However, you will not receive information confirming whether the event has been processed successfully or not.
With Destinations, you will be able to send asynchronous function execution result to an Amazon Web Services service without writing code. A function execution result includes details about version, timestamp, request context, request payload, response context, and response payload. For each execution status (i.e. Success and Failure), you can choose one destination from four options: another Lambda function, an SNS topic, an SQS standard queue, or an EventBridge event bus.
Now you can leverage various combinations of execution status, context, payload, and destination to build new capabilities with asynchronous invocations. For example, you can monitor the health of your serverless applications via execution status, send messages to SQS and SNS without writing code. At failure, you can route failed events to a destination to be investigated or processed in a different way. Destinations allows you to simplify your code and leverage built-in error handling controls on Lambda.
You can get started with these features via Amazon Web Services Management Console, Amazon CLI, Amazon CloudFormation, or Amazon SDK for Lambda. They are available at no additional cost in all Amazon Web Services Regions where Amazon Lambda and the destination services are available, including Amazon Web Services China (Beijing) Region, operated by Sinnet and Amazon Web Services China (Ningxia) Region, operated by NWCD. For more information, see the Amazon Web Services China Region Table.To learn more, see Lambda Destinations in the Amazon Lambda Developer Guide, and visit blog post for Lambda Destinations.