Interview Prep/AWS/VPC and Network Design

Walk through a production VPC layout for a multi-tier app.

BeginnerProductionVPC and Network Design
Answer

Three AZs, three subnet tiers per AZ:

flowchart TD
    IGW["Internet Gateway"] --> Pub["Public subnets x3: ALB, NAT GW"]
    Pub --> App["Private app subnets x3: ECS, EKS, EC2"]
    App --> Data["Isolated data subnets x3: RDS, ElastiCache"]
    App --> NAT["NAT GW per AZ"] --> IGW
    App --> EP["VPC endpoints: S3, ECR, STS, Logs"]

Public subnets hold only load balancers and NAT gateways. App subnets route 0.0.0.0/0 to the NAT in the same AZ. Data subnets have no route to the internet at all. Size app subnets generously (/19 or /20) because EKS and Lambda eat IPs.

aws All AWS questions Roadmap: AWS core services

More on VPC and Network Design