Setup your virtualenv
$(venv) pip install flask zappa
Run your app and make sure local host is returning hello world.
$(venv) python app.py
$ git checkout ch-01
Make sure you have your aws account/creds setup
$(venv) zappa init
Follow the setup instructions.
$(venv) zappa deploy
Assuming no errors zappa will give you a amazon api endpoint. Verify that your hello world app is up and running!
$ git checkout ch-02
Checkout boto3 docs.
boto3 is a dependency of zappa and automatically installed if you are using it outside of zappa just $ pip install boto3 where you need it
Create a dynamoDB table in your AWS console.
Create a new item in your table.
Make sure your email endpoint is working locally.
$(venv) zappa update
$ git checkout ch-03
There are a number of python packages that need to be pre-compiled in order to run on Lambda. Our friend Misserlou, creator of zappa, created an external lambda-packages python repo.
$(venv) pip install -r requirements.txt
Review the register app route in app.py
Test it locally with the bash scripts in cmds.
$(venv) zappa update
$(venv) git checkout ch-04
$(venv) pip install -r requirements.txt
Review the login endpoint.
Test it locally
Update Zappa!
$(venv) git checkout ch-05
Review the auth required decorator
Login with credentials and then use the token to GET request the auth checkpoint
Deploy
$(venv) git checkout ch-06
Note the authorizer function where we updated the token to be stored in Flask's g variable.
Review the execute route.
Deploy!