Book Image

Building Serverless Applications with Python

Book Image

Building Serverless Applications with Python

Overview of this book

Serverless architectures allow you to build and run applications and services without having to manage the infrastructure. Many companies have adopted this architecture to save cost and improve scalability. This book will help you design serverless architectures for your applications with AWS and Python. The book is divided into three modules. The first module explains the fundamentals of serverless architecture and how AWS lambda functions work. In the next module, you will learn to build, release, and deploy your application to production. You will also learn to log and test your application. In the third module, we will take you through advanced topics such as building a serverless API for your application. You will also learn to troubleshoot and monitor your app and master AWS lambda programming concepts with API references. Moving on, you will also learn how to scale up serverless applications and handle distributed serverless systems in production. By the end of the book, you will be equipped with the knowledge required to build scalable and cost-efficient Python applications with a serverless framework.
Table of Contents (11 chapters)

Handling authentication and user controls

After deploying, next we will discuss how to handle the authentication and user controls. The steps are as follows:

  1. Now that we have successfully created the skeleton of our serverless API, we will now work on the nitty-gritty details which are needed to make it a fully functional API. We will start with applying the mapping templates. This can be done in the Integration Request menu. Clicking on the Integration Request link will take you to a console which looks like this:
  1. If you scroll down a bit in the same console, you will notice the Body Mapping Templates section at the end:
  1. Clicking on the Body Mapping Templates will unfurl the options available in that particular section:
  1. Select the second option which says When there are no templates defined (recommended). And then, click on the Add mapping template option and add application...