AWS architecture template

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.

Open in editor

Free to start. Updated .

Diagram of the AWS 3-tier web app template

When to use it

This is the classic AWS layout for a stateful web application: Route 53 for DNS, CloudFront at the edge with AWS WAF attached, an Application Load Balancer as the web tier, EC2 instances in an Auto Scaling group as the application tier, and Aurora plus ElastiCache as the data tier. Static assets come straight from S3 through CloudFront, so the servers only handle dynamic requests.

Choose it when your application already runs on virtual machines, needs local disk or long-running processes, or has to be lifted from a data centre without a rewrite. The cost is operational: you patch the instances, tune scaling policies and plan Aurora failover yourself. Keep the app servers stateless by putting sessions in ElastiCache, and spread every tier across at least two Availability Zones. If the code can move to containers, the EKS template removes much of the instance management.

What's in this template

  • User / ActorBrowsers and mobile clients
  • Route 53Public hosted zone
  • CloudFrontEdge cache and TLS termination
  • WAFManaged rules on the distribution
  • S3Static assets origin
  • ELBApplication Load Balancer (web tier)
  • EC2 Auto ScalingEC2 app servers across AZs (app tier)
  • AuroraAurora MySQL, writer + reader (data tier)
  • ElastiCacheRedis for sessions and hot reads

How it connects

  • User / Actor → Route 53 (network): DNS
  • User / Actor → CloudFront (network): HTTPS
  • WAF → CloudFront (dependency): Web ACL
  • CloudFront → S3 (data): Static assets
  • CloudFront → ELB (network): Dynamic requests
  • ELB → EC2 Auto Scaling (network): HTTP
  • EC2 Auto Scaling → Aurora (data): SQL
  • EC2 Auto Scaling → ElastiCache (data): Sessions

More AWS templates

Make it your own

Open a copy in the editor, then rename, rearrange and extend it.