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)

Securing Lambda inside private subnets

Private subnets are subnets that are not open to the internet. All of their traffic is routed via the public subnet in the same VPC using the concept of route tables. Let's understand how to position our Lambda functions inside private subnets to add an extra layer of security:

  1. Subnets created in the AWS console are not private by default. Let's evaluate and confirm this by going through the details of the subnet that we just created:
  1. Clicking on the Route Table tab will show us the routing settings of our subnet, which basically tells us what kind of traffic is allowed into it:
  1. In the Network ACL tab, you can see the network rules assigned for our subnet. Here, we can see that the subnet is open to all traffic (0.0.0.0/0). So, in order to make our subnet private, we need to fix this:
  1. Go to the Network ACLs console by...