Serverless microservices - Implementing Microservices on AWS

Serverless microservices

“No server is easier to manage than no server”.

Getting rid of servers is a great way to eliminate operational complexity.

Lambda is tightly integrated with API Gateway. The ability to make synchronous calls from API Gateway to Lambda enables the creation of fully serverless applications and is described in detail in the Amazon API Gateway Developer Guide.

The following figure shows the architecture of a serverless microservice with AWS Lambda where the complete service is built out of managed services, which eliminates the architectural burden to design for scale and high availability, and eliminates the operational efforts of running and monitoring the microservice’s underlying infrastructure.

Serverless microservice using AWS Lambda

A similar implementation that is also based on serverless services is shown in the following figure. In this architecture, Docker containers are used with Fargate, so it’s not necessary to care about the underlying infrastructure. In addition to DynamoDB, Amazon Aurora Serverless is used, which is an on-demand, auto-scaling configuration for Amazon Aurora (MySQL‑compatible edition), where the database will automatically start up, shut down, and scale capacity up or down based on your application's needs.

Serverless microservice using Fargate