class SqsDlq
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.EventSources.SqsDlq |
Java | software.amazon.awscdk.services.lambda.eventsources.SqsDlq |
Python | aws_cdk.aws_lambda_event_sources.SqsDlq |
TypeScript (source) | @aws-cdk/aws-lambda-event-sources » SqsDlq |
Implements
IEvent
An SQS dead letter queue destination configuration for a Lambda event source.
Example
import * as dynamodb from '@aws-cdk/aws-dynamodb';
import { DynamoEventSource, SqsDlq } from '@aws-cdk/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
new SqsDlq(queue: IQueue)
Parameters
- queue
IQueue
Methods
Name | Description |
---|---|
bind(_target, targetHandler) | Returns a destination configuration for the DLQ. |
bind(_target, targetHandler)
public bind(_target: IEventSourceMapping, targetHandler: IFunction): DlqDestinationConfig
Parameters
- _target
IEvent
Source Mapping - targetHandler
IFunction
Returns
Returns a destination configuration for the DLQ.