Created
September 16, 2023 23:52
-
-
Save 123epsilon/67f9d75a2c78a164a1cb6a1d40fe673f to your computer and use it in GitHub Desktop.
AWS Elastic Beanstalk Amazon Linux 2 Django Server Commands to access Django environment via eb ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) do an `eb ssh` to your instance | |
2) find your django app in /var/app/current/ | |
3) to activate the venv that elastic beanstalk creates: `source /var/app/venv/staging-*/bin/activate` | |
4) to grab any environment variables set in the evironment configuration: | |
`while IFS='=' read -r name value; do export "$name"="$value"; done < /opt/elasticbeanstalk/deployment/env` | |
5) `python manage.py shell` or whatever you want |
Author
123epsilon
commented
Dec 20, 2023
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment