I have a Lambda function that has a fixed concurrency of 1 that has an SQS trigger configured with a batchSize
of 10. This Lambda function only publishes whatever it encounters to an SNS topic (the code is just a couple of lines). I'm using it to throttle a massive amount of messages that I get so that my backend can process them without choking.
Theoretically this Lambda should never send anything to the SQS's dead letter queue but 80% of the messages end up there! I don't understand why since the Lambda logs show that no execution fails at all. There are no exceptions thrown and only successful executions are being shown in the logs.
At which point does Lambda decide that a particular message should go to the dead letter queue? (my redrive policy has a maximum receive of 3).