TheArchitect / templates
AWS architecture templates
42 free, real-world AWS architectures — from a 3-tier web app to multi-region disaster recovery. Each one opens in TheArchitect, where you can change it, see the estimated monthly cost, and export the CloudFormation or Terraform that builds it.
3-Tier Web App
CDN → Load Balancer → EC2 → RDS + S3
6 AWS services · 36 CloudFormation resources · deploy-ready
Serverless API
API Gateway → Lambda → DynamoDB + SNS
6 AWS services · 8 CloudFormation resources · deploy-ready
Kubernetes Cluster
EKS control plane with VPC, IAM role, private endpoint, and CloudWatch logging
3 AWS services · 31 CloudFormation resources · deploy-ready
Data Pipeline
S3 trigger → Lambda → DynamoDB + SQS + CloudWatch
6 AWS services · 8 CloudFormation resources · deploy-ready
Twitter/X Scale Test
CloudFront behavior split, API Gateway VPC Link, public/internal ALBs, private app/data subnets, queues, media, and data stores
15 AWS services · 52 CloudFormation resources · deploy-ready
HA Web App
SAA-C03: CloudFront + WAF → ALB → Auto Scaling EC2 fleet → RDS + ElastiCache
7 AWS services · 39 CloudFormation resources
Serverless Event Processing
SAA-C03: WAF + API Gateway → Lambda → SQS → Lambda Worker → DynamoDB + SNS
7 AWS services · 13 CloudFormation resources · deploy-ready
EKS Microservices
SAA-C03: CloudFront → ALB → EKS control plane → Aurora + ElastiCache
6 AWS services · 36 CloudFormation resources
Hybrid Connectivity
SAA-C03: Direct Connect → private VPC → EC2 + RDS (on-premises extension)
3 AWS services · 18 CloudFormation resources
Data Lake
SAA-C03: S3 raw zone + KMS encryption → Athena WorkGroup → S3 processed zone
5 AWS services · 6 CloudFormation resources
Streaming Analytics
SAA-C03: Kinesis Data Stream → Lambda → S3 archive + DynamoDB + CloudWatch
6 AWS services · 7 CloudFormation resources · deploy-ready
Multi-Region DR
SAA-C03: Route 53 failover → CloudFront → ALB → Auto Scaling EC2 → Aurora Global
6 AWS services · 35 CloudFormation resources
Security Baseline
SAA-C03: WAF + KMS + Secrets Manager + CloudTrail → S3 + CloudWatch + SNS
8 AWS services · 8 CloudFormation resources
Aurora Global
SAA-C03: Route 53 → ALB → Fargate → Aurora global cluster + CloudWatch
6 AWS services · 35 CloudFormation resources
Redshift Data Warehouse
SAA-C03: Kinesis → Lambda ETL → S3 staging → Redshift + Athena federated query
7 AWS services · 8 CloudFormation resources
CloudTrail Audit
SAA-C03: CloudTrail multi-region logging → S3 + KMS + CloudWatch + SNS alerts
6 AWS services · 6 CloudFormation resources
Auto Scaling Web Tier
SAA-C03: ALB → Auto Scaling EC2 fleet + EBS volumes → RDS + ElastiCache
6 AWS services · 38 CloudFormation resources
Step Functions Orchestration
SAA-C03: API Gateway → Step Functions → Lambda tasks + SQS + DynamoDB + SNS
7 AWS services · 9 CloudFormation resources
Cost Optimization
SAA-C03: CloudWatch budget alarm → Lambda optimiser → Auto Scaling (Spot) + EC2 + S3 (lifecycle) + RDS (right-sized)
6 AWS services · 7 CloudFormation resources
ElastiCache Caching Layer
SAA-C03: API Gateway → Lambda → ElastiCache Redis + RDS (cache-aside pattern)
6 AWS services · 38 CloudFormation resources · deploy-ready
Static Website (S3 + CloudFront + Route53)
SAA-C03: S3 origin → CloudFront CDN → Route53 DNS alias. WAF edge protection, OAC enforces private bucket.
5 AWS services · 5 CloudFormation resources
Serverless REST API (API GW + Lambda + DynamoDB)
SAA-C03: API Gateway → Lambda business logic → DynamoDB NoSQL table. IAM execution role, CloudWatch error alarm.
5 AWS services · 5 CloudFormation resources · deploy-ready
SNS Fan-Out (SNS → SQS × 2 → Lambda)
SAA-C03: SNS topic fans out to two SQS queues, each driving an independent Lambda worker — decoupled pub/sub pattern.
4 AWS services · 13 CloudFormation resources · deploy-ready
RDS Multi-AZ + Read Replica
SAA-C03: Multi-AZ RDS primary for HA, a read replica for read-scale, CloudWatch lag alarm, and enhanced monitoring role.
3 AWS services · 4 CloudFormation resources
Blue/Green Deployment (ALB + Route53 Weighted)
SAA-C03: Two ALB+ASG stacks (Blue=active, Green=standby). Route53 weighted records swap traffic with zero downtime.
4 AWS services · 7 CloudFormation resources
Scheduled Lambda (EventBridge Cron)
SAA-C03: CloudWatch Events/EventBridge rule fires on a cron schedule → Lambda. Decoupled periodic job with DLQ for failed invocations.
5 AWS services · 7 CloudFormation resources · deploy-ready
HTTP API Gateway (cost-optimised serverless)
HTTP API is ~70 % cheaper than REST API ($1.00 vs $3.50 per million calls). Use for simple Lambda proxy integrations without usage plans or API keys.
5 AWS services · 5 CloudFormation resources · deploy-ready
NAT Instance (cheap NAT for dev/test)
A t3.nano EC2 NAT instance costs ~$3.80/mo vs NAT Gateway ~$32+/mo. Valid for dev/test VPCs with low egress. Not HA — use NAT Gateway for production.
2 AWS services · 33 CloudFormation resources
S3 + Athena Analytics (no-warehouse)
Athena queries S3 directly at $5/TB scanned — no cluster to provision. 10–100× cheaper than Redshift for infrequent or ad-hoc analytics workloads.
5 AWS services · 6 CloudFormation resources · deploy-ready
Aurora Serverless v2 (auto-scaling DB)
Aurora Serverless v2 scales from 0.5 to 128 ACUs in seconds. Ideal for dev/test, spiky workloads, or multi-tenant apps. No idle cost at minimum capacity.
5 AWS services · 5 CloudFormation resources
Spot Batch Processing (up to 90 % savings)
SQS-driven Auto Scaling Group of Spot EC2 workers. Scale-in on empty queue, handle Spot interruptions via SQS visibility timeout re-queue.
5 AWS services · 6 CloudFormation resources
CloudFront Edge Auth (Functions vs Lambda@Edge)
CloudFront Functions cost 1/6th of Lambda@Edge for simple header manipulation, URL rewrites, and JWT validation at the edge. Lambda@Edge reserved for heavy compute.
5 AWS services · 5 CloudFormation resources
S3 Intelligent-Tiering & Lifecycle Archive
Full S3 storage cost optimisation: Intelligent-Tiering for unknown access patterns, lifecycle rules cascade to Glacier and Deep Archive — up to 95 % storage cost reduction.
4 AWS services · 5 CloudFormation resources · deploy-ready
Fargate Spot Containers (70 % cheaper)
ECS with FARGATE_SPOT capacity provider — up to 70 % savings over on-demand Fargate. SQS-driven task scaling with graceful SIGTERM handling for Spot interruptions.
6 AWS services · 6 CloudFormation resources
Real-Time Game Leaderboard
Sub-millisecond leaderboard reads via ElastiCache Redis sorted sets backed by DynamoDB for durable score storage.
6 AWS services · 7 CloudFormation resources
IoT Fleet Telemetry Pipeline
Kinesis stream ingests device telemetry with three parallel Lambda consumers: anomaly detection, device shadow updates, and cold-path S3 archival for Athena analytics.
8 AWS services · 13 CloudFormation resources
ML Inference + Feature Store
Serverless ML serving with a dual feature store: Redis for low-latency online features and S3 for offline training set assembly via Athena.
9 AWS services · 13 CloudFormation resources
Media Transcode Pipeline
S3 upload triggers a Lambda dispatcher that enqueues SQS jobs consumed by auto-scaled Fargate workers. Renditions are served via CloudFront.
10 AWS services · 13 CloudFormation resources
FIFO Payments Ledger
Exactly-once payment processing with FIFO SQS deduplication, conditional DynamoDB writes for idempotency, CMK encryption, and a DLQ alert path.
9 AWS services · 13 CloudFormation resources
CQRS + Event Sourcing
Command and Query Responsibility Segregation with DynamoDB Streams as the event bus. Commands append immutable events; a projector builds a denormalised read model.
7 AWS services · 12 CloudFormation resources
Centralised Log Analytics
CloudWatch subscription filters stream application logs through Kinesis into a Lambda transformer that writes partitioned Parquet to S3 for Athena investigation.
8 AWS services · 12 CloudFormation resources
Secrets Rotation & Compliance Audit
Zero hardcoded credentials: EC2 fetches DB credentials from Secrets Manager with automatic 30-day rotation. CloudTrail captures every API call to an immutable S3 audit bucket.
9 AWS services · 9 CloudFormation resources