# SqsDlq

An SQS dead letter queue destination configuration for a Lambda event source.

Extends: SqsDlq
Implements: IEventSourceDlq

- Source: [`aws-lambda-event-sources/lib/sqs-dlq.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda-event-sources/lib/sqs-dlq.ts#L7)

## Example

```ts
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import { DynamoEventSource, SqsDlq } from 'aws-cdk-lib/aws-lambda-event-sources';

declare const table: dynamodb.Table;

const deadLetterQueue = new sqs.Queue(this, 'deadLetterQueue');

declare const fn: lambda.Function;
fn.addEventSource(new DynamoEventSource(table, {
  startingPosition: lambda.StartingPosition.TRIM_HORIZON,
  batchSize: 5,
  bisectBatchOnError: true,
  onFailure: new SqsDlq(deadLetterQueue),
  retryAttempts: 10,
}));
```

## Initializer

```ts
new SqsDlq(queue: IQueue)
```

## Methods

- `bind(_target: IEventSourceMapping, targetHandler: IFunction): DlqDestinationConfig` — Returns a destination configuration for the DLQ.
