Closed
Description
Is your feature request related to a problem? Please describe.
I came across a problem where messages were failing and throwing exceptions, but they weren't sent to the DLQ. They were consumed as successful.
After investigation, I found out that the DLQ#SendMessage call from PowerTools was failing due to a missing KMS permission in my lambda.
That caused some messages to be lost from the queues.
Describe the solution you'd like
- Update the documentation to point out that Encrypt/Decrypt and GenerateDataKey* permissions are required if the SQS is encrypted (at least it's not documented here)
- Perform the DLQ#SendMessage call before the SQS#DeleteMessage (code ref) to make sure the message won't be lost in case of any DLQ misconfiguration.