Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
Run Django manage.py shell commands on elastic beanstalk on AL2

I have my Django service up and running on AWS Elastic Beanstalk (on Amazon Linux 2). eb deploy works perfectly. But I would like to run some functions from shell of Django on by eb or maybe perform migrations on my DB.

I am unable to find my package after I eb ssh <environment-name> so cant find the manage.py file.

Related question - Run manage.py from AWS EB Linux instance

I believe it might be outdated ?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Change to the current app directory

cd /var/app/current/

Change to the staging app directory (only exists after a failed eb deploy)

cd /var/app/staging/

Activate the virtual env

source $(find /var/app/venv/*/bin/activate)

Load your environment variables

export $(sudo cat /opt/elasticbeanstalk/deployment/env | xargs)

Now you can run management commands

python manage.py shell

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!