Monday, November 26, 2018

Elastic Beanstalk and

After many years of spinning up my own AWS EC2 instances to run Django, I thought I ought to finally try Elastic Beanstalk.

I use a lot of management commands in my workflow, like createsuperuser.  Surely there is an easy way to log into an EC2 instance after spinning up beanstalk to run these commands manually?

Yes. From this stackoverflow...

  1. SSH login to Linux
    • (optional may need to run sudo su - to have proper permissions)
  2. Run source /opt/python/run/venv/bin/activate
  3. Run source /opt/python/current/env
  4. Run cd /opt/python/current/app
  5. Run python

No comments: