Book Image

Building Serverless Python Web Services with Zappa

By : Abdulwahid Abdulhaque Barguzar
Book Image

Building Serverless Python Web Services with Zappa

By: Abdulwahid Abdulhaque Barguzar

Overview of this book

Serverless applications are becoming very popular these days, not just because they save developers the trouble of managing the servers, but also because they provide several other benefits such as cutting heavy costs and improving the overall performance of the application. This book will help you build serverless applications in a quick and efficient way. We begin with an introduction to AWS and the API gateway, the environment for serverless development, and Zappa. We then look at building, testing, and deploying apps in AWS with three different frameworks--Flask, Django, and Pyramid. Setting up a custom domain along with SSL certificates and configuring them with Zappa is also covered. A few advanced Zappa settings are also covered along with securing Zappa with AWS VPC. By the end of the book you will have mastered using three frameworks to build robust and cost-efficient serverless apps in Python.
Table of Contents (20 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Installing and configuring the Django REST Framework


We have already covered the virtual environment setup process in detail in the Setting up a virtual environmentsection of Chapter 5, Building a Django Application with Zappa. You can follow these instructions to configure the pipenv tool and create a new virtual environment for this chapter. Let's move to the next section for installing the required packages using the pipenv tool.

Installing the required packages

We are going to develop the REST API using the Django REST framework, so we need to install the following packages using the pipenv install <package_name> command:

  • django
  • djangorestframework
  • djangorestframework-jwt
  • django-storages
  • django-imagekit
  • boto3
  • zappa

Note

You can install multiple packages at once by mentioning the other packages separated by whitespace, such as pipenv install <package_one> <package_two> ....

Once you install these packages, then we are good to proceed with the implementation, and we will have the...