---
title: "AWS Lambda function is not configured for a DLQ"
canonical: "https://kb.cynergy.app/space/MD/1207861251/AWS%20Lambda%20function%20is%20not%20configured%20for%20a%20DLQ"
format: markdown
---
# Description

Configuring a Dead Letter Queue (DLQ) enables you to track and investigate errors or failed requests for a Lambda function. Alternatively, you can set an on-failure destination to forward failed events to a DLQ, SNS Topic, Lambda function, or EventBridge. Understanding failure causes is crucial to ensure data integrity, especially for security-related processes like CloudTrail events, as undelivered events can lead to unnoticed security issues.

# Fix - Build time

## Terraform

- **Resource:** aws_lambda_function
- **Argument:** dead_letter_config

```
resource "aws_lambda_function" "test_lambda" {
  ...   
+ dead_letter_config {
+   target_arn = "test"
+ }
}

```

## CloudFormation

- **Resource:** AWS::Lambda::Function
- **Argument:** Properties.DeadLetterConfig

```
Type: AWS::Lambda::Function
Properties:
  ...
+ DeadLetterConfig:
+   TargetArn: "test"

```

Back to top

Copyright © 2024 [ProwlerPro Inc.](https://prowler.com/)

Made with [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/)