Most suitable approach to set up AWS and job scheduling for a Django REST app

0

I'm new to AWS and working on setting up a Django Rest backend for my (relatively simple) app using PostgreSQL.

For each user, I want it to automatically schedule the following:

  1. An hourly task, which involves obtaining simple data from the database, and sending out a request to an external API,
  2. Performing a daily task (once each day) consisting of a simple database retrieval and a 5-second computation.

In the future, I want to add web requests as well, which involves users to be able to obtain some KPIs from the database.

Would it be best to set up the app by scheduling the tasks using Lambda functions and CloudWatch, or set up an EC2 instance and handle the scheduling by Celery for example? Any other suggestions or tips (e.g. related to scalability) are welcome.

I really appreciate your help, thanks!

2 Antworten
2
Akzeptierte Antwort

In the case of 1000+ users no because cost will be increased to a big value. In this case you can use the EC2+autoscaling group.

Regards, Andrii

profile picture
EXPERTE
beantwortet vor 8 Monaten
profile picture
EXPERTE
überprüft vor 5 Tagen
2

Hello.

If you're just starting out and your tasks are short-lived, going the Lambda + CloudWatch route is simpler, possibly cheaper, and requires less maintenance. CloudWatch can trigger your Lambda function at desired intervals, and your Django REST backend can reside in AWS Lambda as well using frameworks like Zappa.

Regards, Andrii

profile picture
EXPERTE
beantwortet vor 8 Monaten
profile picture
EXPERTE
überprüft vor 5 Tagen
  • Thanks for your help. Would you also recommended this route when adding the handling of web requests and scaling to 1000+ users?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen