How to Configure Celery and Celery Beat with Django deployed on Elastic Beanstalk Amazon Linux 2 with Elasticache as Redis server?

148 views
Skip to first unread message

Edchel Stephen Nini

unread,
Sep 23, 2022, 9:50:34 AM9/23/22
to Django users
Overview:
In our Django web app, there are some background tasks that we want to run every midnight. With this, I tried celery with celery beat.

 I was able to successfully implement background task scheduler with celery beat and worker with Redis as Celery broker following the tutorial on:


The feature is working locally by running the servers, scheduler and workers accordingly on separate terminals.

Django Server:
`python manage.py runserver`

Redis Server:
`redis-server`

Celery Worker:
`celery -A django_project.celery beat -l info`

Celery Beat Scheduler:
`celery -A django_project worker -l info`


Question:
How do I configure this for deployment in Elastic Beanstalk?
What is the correct way to set this up properly with Elasticache as the Redis server?

#### Current Stack:
Django 3.1 deployed on AWS Elastic Beanstalk

Python 3.8 running on 64bit Amazon Linux 2/3.3.9 with ElastiCache endpoint



Reply all
Reply to author
Forward
0 new messages