I have configured an AWS Lambda such that it will be triggered if a specific SQS queue receives message and then it will consume and process the message. If any exception occurs the lambda will retry 2 times and if it fails again then the message will go to DLQ.
SQS configuration:
Dead-letter queue: Enabled
Default visibility timeout: 90 minutes
Receive message wait time: 0 Seconds
Delivery delay: 0 Seconds
Maximum message size: 256 KB
Message retention period: 4 Days
Content-based deduplication: ON
Enable high throughput FIFO: OFF
FIFO throughput limit: Per QUEUE
Deduplication scope: QUEUE
DLQ-->
Enabled: True
Maximum Receive: 10
Lambda Configuration:
Timeout: 15min 0sec
Maximum age of event: 6 hours
Retry attempts: 2
Everything was working fine. The lambda was retrying 2 times for error scenario and then it was sending data to DLQ. But now, all of a sudden, one message got stuck in flight for 15 hours. Now, it is retrying 10 times before going to the DLQ since maximum receive is set to 10. What could be the reason behind it?