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

Designing an image gallery application


Once we are done with configuration, then we can start implementing the application. The ImageGallery application will be straightforward—a user can create a new photo album record and can upload multiple images at once. Once the photo album is created, we will display all existing album records in list view along with associated images as thumbnail views.

 

Let's see the implementation phase, as per our requirements.

Design overview

I am going to create an image gallery application based on Django. We are going to use Django admin for the purpose of the UI. Django admin has a very pretty UI/UX design. So we are going to create some models, such as a PhotoAlbum model that will have a one-to-many relationship with the Photo model.

Then we are simply going to register these models with the Django admin panel. Once we are done with the admin configuration, we will configure the static and media settings to upload the dynamic images to an Amazon S3 bucket and...