Lambda for sending emails based on time

55 views Asked by At

I have a project that must have functionality to schedule email triggers. There are presentations, each presentation has a start date and time, I can set a trigger to send notification emails for users, and set hh:mm how long before the start of their presentation the letter should be sent.

Example: if I set 00:01 users must receive an email before 1 minute of the presentation start

My question: What is the best approach to implement this functionality?

My project is based on Serverless

My implementation:

  • Save triggers in db
  • Schedule lambda to invoke every 1 minute
  • Lambda must scan triggers from DB and send emails to users according to time

But I have some concerns:

  • Is this normal to invoke lambda every minute
  • If I schedule trigger for 00:01 but in the moment after the scheduled lambda was invoked, do my users receive emails with a delay of 1 minute?
0

There are 0 answers