> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lambda Destinations

> Lambda Destinations allows custom actions after asynchronous invocations in AWS Lambda, enhancing operational efficiency and integrating into event-driven architectures.

Lambda Destinations is a powerful feature within AWS Lambda that allows you to define custom actions immediately after an asynchronous invocation. Depending on whether a Lambda function completes successfully or fails, you can specify distinct workflows to handle each outcome. This flexibility not only enhances operational efficiency but also integrates seamlessly into broader event-driven architectures.

<Frame>
  ![The image is a flowchart illustrating AWS Lambda with various triggers leading to a Lambda function, which then branches into "OnSuccess" and "OnFailure" outcomes.](https://kodekloud.com/kk-media/image/upload/v1752859527/notes-assets/images/AWS-Certified-Developer-Associate-Lambda-Destinations/aws-lambda-flowchart-triggers-outcomes.jpg)
</Frame>

## How Lambda Destinations Works

After a Lambda function finishes executing, Lambda Destinations triggers different processes based on the result:

* **OnSuccess:** If the function executes successfully, you can forward a message to services like SQS, EventBridge, SNS, or even initiate another Lambda function.
* **OnFailure:** If the function encounters an error, you can channel the error details to designated destinations, helping you to quickly identify and resolve issues, similar to using a dead letter queue but with added flexibility.

<Callout icon="lightbulb" color="#1CB2FE">
  Lambda Destinations is applicable only for functions invoked asynchronously. Ensure your Lambda function's invocation type aligns with this capability.
</Callout>

## Key Benefits of Lambda Destinations

* **Versatile Destination Options:** Configure separate destinations based on successful execution or error conditions.
* **Wide Integration:** Supported destination services include SQS, SNS, EventBridge, and the ability to trigger additional Lambda functions.
* **Enhanced Context:** The destination event includes enriched information about the original invocation and its outcome, simplifying troubleshooting and complex workflow management.

<Frame>
  ![The image lists four key points with icons: Asynchronous Invocations, Success and Failure Handling, Supported Destination Services, and Event Enrichment.](https://kodekloud.com/kk-media/image/upload/v1752859528/notes-assets/images/AWS-Certified-Developer-Associate-Lambda-Destinations/asynchronous-invocations-key-points.jpg)
</Frame>

## Use Cases

Lambda Destinations enhances the reliability and scalability of your cloud applications by:

* **Automating follow-up tasks:** Customize workflows such as logging, alerting, or data processing after a function's execution.
* **Building resilient systems:** Quickly respond to failures with automated retries or notifications.
* **Integrating with broader services:** Seamlessly connect your Lambda functions with other AWS services to create robust, event-driven architectures.

With Lambda Destinations, you gain complete control over post-invocation processes, optimizing the performance and reliability of your asynchronous workflows in AWS Lambda.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/aws-certified-developer-associate/module/3c842ffc-5841-456d-9fad-7bb3af5fdbfc/lesson/d1529a58-b2be-4aad-bf9f-7538811981bf" />
</CardGroup>
