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

Creating Your First Serverless Data API

In this chapter, we will build a complete serverless microservice, accessible via a REST API, and capable of querying a NoSQL database. We will start by discussing and creating the Amazon Web Services (AWS) security infrastructure to ensure restricted access to AWS resources. We will then create, add records to, and query a NoSQL database, first using the Management Console, then using Python. Then, we will go over the code used in the Lambda function in Python and API Gateway integration. Finally, we will deploy it and test that the API is working.

The following topics will be covered in this chapter:

  • Overview of security in AWS
  • Securing your serverless microservice
  • Building a serverless microservice data API
  • Setting up Lambda security in the AWS management console
  • Creating and writing to a NoSQL database called DynamoDB using AWS
  • Creating...