Pattern · Distributed systems

Microservices Architecture

Independently deployable services, each owning its data and business capability.

MICROSERVICES ARCHITECTURE API Gateway Single entry point Auth Service Cognito · JWT Orders Service ECS · Lambda User Service ECS · Lambda Auth DB DynamoDB Orders DB RDS Aurora Users DB DynamoDB Each service owns its data — communicates via SQS · SNS · EventBridge

Overview

Microservices decompose a monolith into small, independently deployable services. Each service owns its business domain and data store, communicates through APIs or events, and can be scaled, deployed, and failed in isolation.

Core Principles

Single Responsibility

Each service does one thing and does it well. Bounded by a business capability, not a technical layer.

Decentralized Data

Each service owns its own database. No shared schemas. Consistency through events, not transactions.

Fault Isolation

One service failing doesn't cascade. Circuit breakers, bulkheads, and timeouts contain failure.

Deploy Independently

Each service has its own CI/CD pipeline. Deploy without coordinating with other teams.

Key Patterns

AWS Services

References

ECS Microservices CloudFormation

Complete architecture with ECS, ALB, and service discovery

GitHub

Terraform EKS Module

EKS cluster for Kubernetes-based microservices

GitHub

Microservices on AWS

AWS whitepaper — patterns, anti-patterns, and implementation guides

AWS Whitepaper

Well-Architected Microservices Lens

Framework guidance specifically for microservices

AWS Docs