SqsDestination
- class aws_cdk.aws_lambda_destinations.SqsDestination(queue)
Bases:
object
Use a SQS queue as a Lambda destination.
- ExampleMetadata:
infused
Example:
# An sqs queue for unsuccessful invocations of a lambda function import aws_cdk.aws_sqs as sqs dead_letter_queue = sqs.Queue(self, "DeadLetterQueue") my_fn = lambda_.Function(self, "Fn", runtime=lambda_.Runtime.NODEJS_14_X, handler="index.handler", code=lambda_.Code.from_inline("// your code"), # sqs queue for unsuccessful invocations on_failure=destinations.SqsDestination(dead_letter_queue) )
- Parameters:
queue (
IQueue
)
Methods
- bind(_scope, fn, *, type)
Returns a destination configuration.
- Parameters:
_scope (
Construct
)fn (
IFunction
)type (
DestinationType
) – The destination type.
- Return type: