# SqsDestination

Use a SQS queue as a Lambda destination.

Extends: SqsDestination
Implements: IDestination

- Source: [`aws-lambda-destinations/lib/sqs.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-lambda-destinations/lib/sqs.ts#L8)

## Example

```ts
// An sqs queue for unsuccessful invocations of a lambda function
import * as sqs from 'aws-cdk-lib/aws-sqs';

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

const myFn = new lambda.Function(this, 'Fn', {
  runtime: lambda.Runtime.NODEJS_LATEST,
  handler: 'index.handler',
  code: lambda.Code.fromInline('// your code'),
  // sqs queue for unsuccessful invocations
  onFailure: new destinations.SqsDestination(deadLetterQueue),
});
```

## Initializer

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

## Methods

- `bind(_scope: Construct, fn: IFunction, _options?: DestinationOptions): DestinationConfig` — Returns a destination configuration.
