hangc
hangc

Reputation: 5473

SQS Lambda - Redrive Policy vs DeadLetterConfig

I have set up lambda integration to SQS with fixed reserved concurrency to throttle requests to a backend service. I need to use a DLQ to track and store errors.

What are the differences in behavior between using the Redrive Policy of the SQS vs the DeadLetterConfig of the lambda function?

I am particularly interested in the behavior when there are huge amounts of messages in the Queue but with limited lambda concurrency.

Upvotes: 1

Views: 2444

Answers (1)

Manohar Kotapati
Manohar Kotapati

Reputation: 111

The dead-letter queue that you configure on a function is used for the function's asynchronous invocations, not for event source queues. Lambda polls the sqs queue and invokes your function synchronously with an event that contains queue messages. So if you use SQS as event source, DeadLetterConfig is of no use. You have to configure DLQ with re-drive policy for the source SQS.

Source : https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html

Upvotes: 5

Related Questions