I recently implemented DLQ(Dead Letter Queue) for SQS. I have done the following three configurations.
- Default visibility timeout in SQS.
- In the Dead Letter Queue configuration, enable and Maximum receives are configured as 3.
- In Lambda configuration, Report batch item failures are enabled.
But the problem, all success/failure messages are processed three times and moved to DLQ.
For success cases, the correct JSON response is returned.
Once I disable the "Report batch item failures is enabled", message will deleted for both success/failure cases.