When hosting Django applications on AWS Elastic Beanstalk, it is often required to run commands on the server to do some maintenance tasks.Beanstalk provisions EC2 instances that are running the web server processes. Django commands need to run in the same environment.
You might want to fix your shell first.
After connecting using SSH with
eb ssh
export $(cat /opt/elasticbeanstalk/deployment/env | xargs)
then load the Python environment using
source /var/app/venv
and finally run your Django command
python /var/app/current/manage.py runserver
Erben Systems GmbH
Watterstrasse 81, c/o Sarbach Treuhand AG, 8105 Regensdorf, Switzerland
CHE-174.268.027 MwSt