First, you need to have an AWS IAM account, and set up and instance.
Next, you can SSH into the instance with
ssh -i key.pem end_point
Once you are inside the instance, you have to set up your environment.
sudo apt-get install python-pip to install pip.
pip install -r requirements.txt to install your environment. If you have database migrations, run them too.
Then change the
ALLOWED_HOSTS inside django
settings.py to the IP and domain name of server
Don’t forget to open the access of security group of 8000 for testing.
To test if it’s working, run
python manage.py runserver to test if it works.
sudo apt-get install nginx
Open the browser to see nginx default page.
pip install gunicorn
write gunicorn into a systemctl
sudo systemctl restart gunicorn
sudo apt-get install libmysqlclient-dev
set up DB credentials in