Launching an application with Zappa

Joseph B. Manley
Feb 23 · 2 min read

Over a year ago now, I came across a fancy little library called Zappa. For those unaware, Zappa is a serverless framework for Flask and Django. In this case, it runs on the AWS cloud using API Gateway to call lambda functions. It is an excellent solution for creating REST APIs or low traffic website, and since it is serverless, it can scale relatively easily. So let’s launch a simple flask application with Zappa.

Photo by Dallas Reedy on Unsplash

Our requirements.txt

Zappa is a framework for Flask, so that means python. Luckily because it’s in python, as long as you have it installed correctly, additional dependencies are generally very easy to install. In this case, we’ll need to begin by setting up a virtual environment for Zappa to run in.

Runpip install virtualenv to install the virtual environment library. From there it as simple as CDing into your project directory and run the command virtualenv [Name of your virtualenv] Now that the virtual environment is created, to activate it, if you are on windows, do while[virtualenv]/bin/active on Linux, you are going to want to run.source [virtualenv]/bin/activate

Now that you are in a python virtual environment, you can install the final dependencies with a simple pip install: pip install flask zappa

Configuring zappa_settings.json

We will be deploying a simple HTTPS application that returns a string input. Before we can deploy, we need to configure our deployment. To do this, we can just run the command andzappa init follow it’s instructions.

Deploy your application

Now that you have configured your Zappa deployment, we can now actually deploy that configuration. It’s as easy as running the command,zappa deploy optionally if you set up multiple stages within a single settings file, the command iszappa deploy (stage) .

Whenever you would like to update your application, all you run is.zappa update (stage)

Congratulations, if you had no issues, you should have been given a URL where you can test your application!


Zappa is one of my favorite tools for deploying and managing lambda functions. It’s flexible and easy to use. If you are having any issues see Zappa’s GitHub page for more info or feel free to contact me.

Joseph B. Manley

Written by

Cloud Developer and President of the MCCC International Relations Club

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade