Set retry with delay to a failed Sqs message that was executed by a lambda function

156 Views Asked by At

I have a lambda function that is triggered by an SQS message. I want to set a retry for the message incase of failure. The thing is, i want this retry to be executed after 5 minutes delay. How can i do that? I'm currently not using a DLQ, but can add one if necessary. The thing is I'm not sure DLQ supports delay messages. I know there's the delayMessage param for SQS, but for my understanding it is set once when putting the message in the queue. And for the original execution i don't want the delay - Only for the retry. Suggestions?

Pssoible solutions i don't want to use-

  • sleep within the lambda before raising
  • Not sending the same message again to the queue, but a new message with the delayMessage parameter
0

There are 0 best solutions below