SqsDlq
- class aws_cdk.aws_lambda_event_sources.SqsDlq(queue)
Bases:
object
An SQS dead letter queue destination configuration for a Lambda event source.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_dynamodb as dynamodb from aws_cdk.aws_lambda_event_sources import DynamoEventSource, SqsDlq # table: dynamodb.Table # fn: lambda.Function dead_letter_queue = sqs.Queue(self, "deadLetterQueue") fn.add_event_source(DynamoEventSource(table, starting_position=lambda_.StartingPosition.TRIM_HORIZON, batch_size=5, bisect_batch_on_error=True, on_failure=SqsDlq(dead_letter_queue), retry_attempts=10 ))
- Parameters:
queue (
IQueue
) –
Methods
- bind(_target, target_handler)
Returns a destination configuration for the DLQ.
- Parameters:
_target (
IEventSourceMapping
) –target_handler (
IFunction
) –
- Return type: