Book Image

Building Serverless Microservices in Python

By : Richard Takashi Freeman
Book Image

Building Serverless Microservices in Python

By: Richard Takashi Freeman

Overview of this book

Over the last few years, there has been a massive shift from monolithic architecture to microservices, thanks to their small and independent deployments that allow increased flexibility and agile delivery. Traditionally, virtual machines and containers were the principal mediums for deploying microservices, but they involved a lot of operational effort, configuration, and maintenance. More recently, serverless computing has gained popularity due to its built-in autoscaling abilities, reduced operational costs, and increased productivity. Building Serverless Microservices in Python begins by introducing you to serverless microservice structures. You will then learn how to create your first serverless data API and test your microservice. Moving on, you'll delve into data management and work with serverless patterns. Finally, the book introduces you to the importance of securing microservices. By the end of the book, you will have gained the skills you need to combine microservices with serverless computing, making their deployment much easier thanks to the cloud provider managing the servers and capacity planning.
Table of Contents (13 chapters)
Title Page
Dedication

Securing your serverless microservices

In this section, we will discuss security in detail.

Lambda security

As we discussed earlier, AWS Lambda is the central component in a serverless stack, or the integration connector with your custom code, triggered by events between AWS managed services. A Lambda function always has an execution IAM role associated with it, and using policies attached to that role is one of the best, and most secure, ways to deny or grant it access to other AWS resources. The beauty is that there is no need to manage or exchange any keys or passwords for a lot of the AWS managed services, such as S3, DynamoDB, and Kinesis Stream. There are some exceptions, such as some of the Amazon Relational Database Service...