How does it work?

The AMI is designed in such a way that you only need to deal with one folder: /var/www/webapp. That folder will contain all your configuration files and your source code.

This is how the /var/www/webapp/ folder of your AMI should look like when you launch it:

├── conf
│   ├── autorun.sh
│   ├── celery
│   │   └── celery.conf
│   ├── cron
│   │   ├── d
│   │   ├── daily
│   │   ├── hourly
│   │   ├── monthly
│   │   └── weekly
│   ├── global
│   │   ├── hostname
│   │   └── timezone
│   ├── mail
│   │   ├── msmtprc
│   │   └── notifications
│   ├── netdata
│   │   └── password
│   ├── nginx
│   │   ├── helloworld.crt
│   │   ├── helloworld.key
│   │   └── web.conf
│   └── uwsgi
│       └── uwsgi.ini
└── src
    ├── helloworld
    │   ├── __init__.py
    │   ├── celeryapp.py
    │   ├── settings.py
    │   ├── urls.py
    │   └── wsgi.py
    ├── manage.py
    └── requirements.txt

You can check the contents of our Django demo project

Let’s start with the more obvious part, the src folder. This is the usual Django folder structure and a requirements.txt file. If you have used Django before, the folder structure should look very familiar.

That said, let’s move on to the conf folder. That folder contains the configuration files for each service. You’ll be able to edit the behavior of all the services from here, without having to edit anything else. Just apply your changes and restart the services using the usual systemd commands or the additional CLI tools provided with this AMIs.