Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS SQS messages stuck in flight when using Lambda triggers

I have configured a queue with a DLQ with maximum receives value to 5. The lambda was configured to pool 1000 messages in a 30 seconds batch window. Whenever the lambda processor receives an invalid messages, it will throw an error and I assumed the messages will eventually moved to DLQ when it reaches the receive count >= 5. But the messages are stuck in flight. And it seems the lambda processor wont retry those messages. Should I update the visibility timeout or any message attributes in the lambda processor just to make those messages visible again, retried and eventually moved to the DLQ?

like image 253
Shitake Mushroom Avatar asked Dec 20 '25 10:12

Shitake Mushroom


1 Answers

If the SQS Queue is KMS encrypted. Make sure that the Lambda IAM role has permissions to decrypt the KMS key.

like image 64
shbedev Avatar answered Dec 23 '25 17:12

shbedev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!