Best Practice to Redrive events from a Lambda DLQ


We have a Lambda Function triggered from EventBridge events. If the lambda fails it will write the records to a DLQ. What is the best practice to redrive those messages back to the lambda. Note, we can not use the built in redrive method bc that will only work with bc that is only to send the messages to another SQS queue (not a lambda). My only thought is to build a 2nd "redrive" lambda that pulls the message off the queue and sends them 1 by 1 to the original lambda. Also of note, we don't want this process to be automatic, whatever caused the failures needs to be addressed before we manually redrive the events.

1 Answer

Have you considered Lambda Destinations? With Destinations, you can move messages to SNS and then fan out to SQS and send automated alerts to concerned teams. When the issue is fixed, the messages can then be picked up from the SQS and moved to the EventBridge.

answered 2 months ago
  • So my concern with this is that A) multiple things may subscribe to the event and some of those may be successful. So I don't want those other things to trigger again if the event is placed back on EventBridge. And B), this requires an SNS and another SQS resource (for each lambda i setup this way). That sounds like a lot of additional resources just to redrive events back to the lambda. SQS supports this nicely with the redrive features, thinks that land on the DLQ can easily be sent back to the main queue. With Lambda DLQ, it would be great if you could redrive the events back to the lambda internal queue, but that feature just doesn't exist (yet). Its just interesting that AWS offers this DLQ feature on lambdas but no real examples or best practices on how to utilize it.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions