Example of a flask app using dynamodb to serve as an api
Steps to make this work in Zappa
aws configure
and set your access keys and the region you would like to use for you DynamoDbpip install virtualenv
) python -m venv \zappenv
5b for mac virtualenv zappaenv
\zappenv\Scripts\activate.bat
6b. for Mac source ./zappaenv/bin/activate
install requirements.txt pip install -r requirements.txt
(note) you may need to update pip and remember to include any additional requirements you have added.
to update pip type python -m pip install --upgrade pip
if you have to upgrade pip you will need to install requirements again.
****run pip install zappa --upgrade
(This is not mentioned in the video)*****
zappa init
you are almost always ‘ok’ if you except the defaults, but you can change them
(note) you should see a “zappa_settings.json” file appear in your directory.zappa deploy dev
This is assuming you used the defaultAssuming you have to (or just want to) update your flask application.
zappa update dev
We are not doing this any longer!