Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS: What can I use to run periodic tasks on RDS?

In specific RDS column as a date, I keep the information when user's trials end.

I'm going to check everyday these dates in database and when less the few days lefts to the end of trial, I want send an email message (with SES).

How can I run a periodic tasks in AWS to check database? I know that I can use:

  • Lambda
  • EC2 (or Elastic Beanstalk)

Is there any other solution which I've missed?

like image 571
nicq Avatar asked Jun 02 '17 07:06

nicq


2 Answers

You can also use AWS Batch for this. This suits better if the job is heavy and takes more time to complete.

like image 184
Ashan Avatar answered Sep 22 '22 03:09

Ashan


How long does it take to run your check? If it takes less than 300 sec and is well within the limits of Lambda (AWS Lambda Limits), then schedule tasks with Lambda: Schedule Expressions Using Rate or Cron

Otherwise, the best option is to use: AWS Data Pipeline. Very easy to schedule and run your custom script periodically. It charges at least one hour of instance.

like image 34
helloV Avatar answered Sep 18 '22 03:09

helloV