AWS architecture template
AWS serverless API
API Gateway with a Cognito JWT authorizer, Lambda handlers, DynamoDB storage and an SQS queue for background jobs.
Free to start. Updated .

When to use it
Use this template for a new API with spiky or unpredictable traffic where you would rather pay per request than run servers. Clients sign in with Amazon Cognito, API Gateway validates the JWT before any code runs, Lambda functions handle each route, and DynamoDB stores the data. Work that does not need to finish inside the request goes onto an SQS queue, and a second Lambda function picks it up, retries failures and parks poison messages on a dead-letter queue.
The trade-offs are cold starts, the 15-minute Lambda limit and DynamoDB's access-pattern-first data modelling. Design your keys around the queries you need before you write code, because changing them later means migrating data. CloudWatch collects logs and metrics from every function, so set alarms on errors, throttles and queue age from day one. If you need relational queries, swap DynamoDB for Aurora Serverless and connect to it through RDS Proxy.
What's in this template
User / ActorWeb or mobile client
CognitoUser pool issues JWTs
API GatewayHTTP API with JWT authorizer
LambdaRequest handlers
CloudWatchLogs, metrics and alarms
DynamoDBSingle-table data model
SQSBackground jobs, with a dead-letter queue
LambdaQueue worker
How it connects
- User / Actor → Cognito (api): Sign in
- User / Actor → API Gateway (api): HTTPS + JWT
- API Gateway → Cognito (dependency): Validate token
- API Gateway → Lambda (Request handlers) (api): Lambda integration
- Lambda (Request handlers) → DynamoDB (data): Read/write items
- Lambda (Request handlers) → SQS (data): Enqueue job
- SQS → Lambda (Queue worker) (data): Event source mapping
- Lambda (Queue worker) → DynamoDB (data): Update status
- Lambda (Request handlers) → CloudWatch (dependency): Logs and metrics
More AWS templates

AWS 3-tier web app
CloudFront and WAF in front of an Application Load Balancer, EC2 Auto Scaling app servers, Aurora and ElastiCache in a VPC.

AWS static website with CloudFront
Private S3 bucket behind CloudFront with origin access control, ACM, WAF and a CodePipeline build that deploys on push.

AWS EKS microservices
Amazon EKS behind an Application Load Balancer, with ECR images built by CodeBuild, Aurora, ElastiCache and IAM pod roles.
Make it your own
Open a copy in the editor, then rename, rearrange and extend it.