Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda. Invoke with delay

I need to build "tasks scheduler" with Amazon tools. Main problem that i need execute task once with huge delay (it may be a few hours or few weeks).

I try to research how to build it with CloudWatch and Lambda function. As i understand - i need to use separate rule for one timeout execution. But AWS allow me only 100 rules/account.

Probably i'm going wrong way and this tools not intended for my task.

Also i tried SQS, but it did't allow me to set timeout more than 15 minutes. The simplest way - use own mircoservice with crone, but i hope that it is possible to do it in cloud )

May be someone has the same issue and can share with me thoughts about the implementation of this?

like image 570
Boris P. Avatar asked Mar 10 '23 00:03

Boris P.


2 Answers

CloudWatch rules should work and you can use a cron expression for the event schedule.

like image 158
clonq Avatar answered Mar 16 '23 15:03

clonq


I would recommend you to use disque for delaying message/retry and apscheduler (python) for scheduling your tasks.

You can use disque as a cluster also.

You can put these two inside an ec2-machine depending on your use-case.

Let me know, if you need any help!

like image 29
tom Avatar answered Mar 16 '23 16:03

tom