0

I connect to my EC2 instance and I use Django and deploy with elasticbeanstalk. I'd like to check how many Users in my service...but There is no app folder in EC2 instance and don't know how to make superuser like using console

python manage.py createsuperuser

Is there any solution to check my users?(except make admin page or container_commands <- I already tried but it doesn't work. so I'd like to try the other way.)

Warning: Permanently added '15.164.165.224' (ECDSA) to the list of known hosts.
 _____ _           _   _      ____                       _        _ _
| ____| | __ _ ___| |_(_) ___| __ )  ___  __ _ _ __  ___| |_ __ _| | | __
|  _| | |/ _` / __| __| |/ __|  _ \ / _ \/ _` | '_ \/ __| __/ _` | | |/ /
| |___| | (_| \__ \ |_| | (__| |_) |  __/ (_| | | | \__ \ || (_| | |   <
|_____|_|\__,_|___/\__|_|\___|____/ \___|\__,_|_| |_|___/\__\__,_|_|_|\_\
                                       Amazon Linux AMI

This EC2 instance is managed by AWS Elastic Beanstalk. Changes made via SSH 
dhooonk
  • 2,115
  • 3
  • 11
  • 17

1 Answers1

0

How to run manage.py from AWS Elastic Beanstalk AMI.

SSH login to Linux

(optional may need to run sudo su - to have proper permissions)

source /opt/python/run/venv/bin/activate
source /opt/python/current/env
cd /opt/python/current/app
python manage.py <commands>

Or, you can run command as like the below:

cd /opt/python/current/app
/opt/python/run/venv/bin/python manage.py <command>

I have referenced the article below.

Run manage.py from AWS EB Linux instance

djvg
  • 11,722
  • 5
  • 72
  • 103
dhooonk
  • 2,115
  • 3
  • 11
  • 17