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

Configuring the Quote API application with async features


In the last chapter, we created a Quote API and configured a custom domain. Now we are going to enhance and optimize the existing application. There will be some new features that we are going to add to the application in order to demonstrate the different types of invocations. 

We are going to use the existing code base as a different project, so it would be good to copy the existing code base in a new directory; in our case, we will copy the Chapter08 code base as Chapter09; however, you will be required to update the zappa_settings.json file. In the upcoming section, we will be covering the Zappa settings changes.

SMS subscription with Amazon SNS for the daily quote

We are going to add the new feature of the SMS subscription for receiving quotes on a daily basis. This would require us to configure Amazon SNS using the Boto3 library. Boto3 is a complete Python SDK library that enables us to interact with AWS services programmatically...