$ pip3 install awsebcli --upgrade --user
$ eb --version
$ python3 -m venv myvenv
$ source myvenv/bin/activate
$ python3 -m pip install --upgrade pip
$ pip install django==2.1.1
$ django-admin startproject firstproject
$ cd firstproject
$ python3 manage.py startapp firstapp
$ python3 manage.py migrate
# Created by https://www.gitignore.io/api/django
# Edit at https://www.gitignore.io/?templates=django
### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
db.sqlite3
media
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
$ pip freeze > requirements.txt
$ mkdir .ebextensions
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: firstapp(앱 이름)/wsgi.py
$ deactivate
### eb init을 사용하여 초기화 과정 진행
$ eb init -p python-3.6 first(어플리케이션 이름 아무거나)
### IAM credential CSV파일에 있는 id랑 key를 입력해줍니다!
### "Application first has been created." 화면에 뜨면 어플리게이션이 잘 생성되었다는 것
$ eb create first(환경 이름 아무거나)
### 어플리케이션 이름과 동일해도 상관없다.
### "2020-05-19 16:18:24 INFO Successfully launched environment: first" 환경이 잘 생성됨.
$ eb status
ALLOWED_HOSTS = ['여기에 CName']
$ eb deploy
### "2020-05-19 16:21:02 INFO Environment update completed successfully." 환경이 잘 생성됨.
$ eb open
$ eb deploy
$ eb open