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.
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