This repository should ease up your project setup by using Cookiecutter for choosing Flask or Django and Zappa for deploying your AWS Lambda.
Make sure you have following locally installed.
# Best to install it globally
python3 -m pip install cookiecutter
cookiecutter gh:jolo-dev/zappa-template
Wanna improve this?
cd *project_slug*
python3 -m venv .env
source .env/bin/activate
pip install --upgrade pip # In case you need to
pip install -r requirements.txt
After setting up, you should be able to run following commands.
zappa deploy dev
# For Changes and Updating
zappa update dev
# Tear down the deployment
zappa undeploy dev
Django is a fully fleshed application which requires a database. In this template, the default database is deactivated. Here is a very good instruction, how to setup a database on AWS and Zappa
zappa deploy dev # The function needs to be up and running
zappa update dev # If neccessary
zappa manage dev "collectstatic --noinput"
In the project_slug/settings.py
, the ALLOWED_HOSTS
is set to "*". This should be used with caution.
You might replace it with the API endpoint you get from AWS.
For Production, you should definitely change that.
You are now able to reach the admin
- section by appending /admin
to the given URL.