Prerequisites:
To deploy a Flask website, first create a virtual environment using below commands in cmd terminal…
- >mkdir demo
- >cd demo
- demo> virtualenv <name_virtualenv>
- demo> %HOME_Path%\ <name_virtualenv> \Scripts\activate
To check environment is now active like below: (<name_virtualenv>) C:\>
Now, Install all necessary dependencies in a virtual environment
- (<name_virtualenv>) C:\> pip install flask
- (<name_virtualenv>) C:\> pip install Flask zappa
- (<name_virtualenv>) C:\> pip freeze
- (<name_virtualenv>) C:\> pip freeze > requirements.txt
Download the following zip file extract it and copy the app.py and templates folder into demo folder
Now Our flask website is ready to deploy
zappa init
When you run this command it asks you to enter certain details from that create zappa_settings.json file please leave all the details as default
Now, run the following command to deploy the website
zappa deploy dev
This command gives you one link as an output which you need to enter in browser to see the output
OUTPUT:

After updating the website run following command to update the environment
zappa update dev