0

When the lambda function receives message/notification/event, my requirement is to process it straightaway but it fails, push it to AWS infra so that it can be retried with backoff approach with support for ~1day delay before final retry is triggered.

I am able to do first job (invoke lambda and process) but in case of failure, I am struggling to find a solution as SQS only supports linear retry (can't rely on visibility timeout as it is also linear) and SNS limits max delay to 1h. Triggering AWS events is not an option as it means all the messages will be processed with different retry strategy.

I would like to point out that I don't want to write a cron myself as it means I will have to run the check myself and also run cron every minute(which even though is a small task is something I would like to avoid). Also, FIFO is not an option as system should scale to support > 1m events.

743
  • 155
  • 2
  • 10
  • Your question is unclear. What do you mean by "linear retry"? – Marcin Nov 22 '22 at 00:39
  • @Marcin Linear retry means all retries will be triggered after set interval whereas I would like first retry after 5mins, 2nd after 25mins and so on with support for maxDelay between retries to be 1d. https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html#creating-delivery-policy ![retry policy](https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png). – 743 Nov 22 '22 at 00:48
  • Maybe with step functions you could develop a custom solution for that. SFs have `Wait` action. – Marcin Nov 22 '22 at 00:51

0 Answers0