Overview
Amazon Web Services is the largest cloud provider. Its core building blocks are compute (EC2, Lambda, ECS, EKS), storage (S3, EBS, EFS), databases (RDS, Aurora, DynamoDB, ElastiCache), networking (VPC, Route 53, CloudFront, Elastic Load Balancing), messaging (SQS, SNS, EventBridge, Kinesis), and security (IAM, KMS, Secrets Manager).
Resources live in regions, each with multiple availability zones. A VPC is your private network with public and private subnets. IAM controls who can do what, using policies attached to users, roles, and resources. Knowing which service fits a need, and how they connect, is the foundation for cloud system design interviews.
AWS is a store with aisles for every infrastructure need: servers, storage, databases, networking, and security. You pick building blocks off the shelf and wire them together, paying only for what you use.
When to use it
- Designing systems in interviews where AWS services are expected.
- Choosing managed services for a new product.
- Mapping generic components (cache, queue, blob store) to concrete services.
- Security and network design in the cloud.
Where it shows up in interviews
Recognize it when: design X on AWS.
- Design a URL shortener on AWS
- Design a serverless image processing pipeline
Recognize it when: public web tier, private data tier.
- Design a three-tier web app in a VPC
- Design PCI-compliant payments
Where it is used in real software
Route 53 and CloudFront, then an Application Load Balancer, EC2 or ECS in private subnets, and RDS Multi-AZ.
API Gateway, Lambda, DynamoDB, S3, and EventBridge power many startups with no servers.
AWS's pillars: operational excellence, security, reliability, performance, cost, and sustainability.
Key terms
- EC2 / Lambda
- Virtual machines / serverless functions.
- S3 / EBS
- Object storage / block volumes for EC2.
- VPC / subnet / security group
- Private network / IP range in one AZ / instance-level firewall.
- IAM role
- Identity with permissions assumed by services or users, with temporary credentials.
- ALB / NLB
- Layer 7 / layer 4 load balancers.
How it works, step by step
- 1Network
VPC across 2-3 AZs, public subnets for load balancers, private subnets for apps and data.
- 2Edge
Route 53 DNS, CloudFront CDN, WAF.
- 3Compute
ECS/EKS, EC2 Auto Scaling, or Lambda.
- 4Data
RDS/Aurora, DynamoDB, ElastiCache, S3.
- 5Security and operations
IAM roles, KMS, Secrets Manager, CloudWatch, CloudTrail.
Generic component to AWS service
Cheat sheet for interviews
| Need | AWS service | Notes |
|---|---|---|
| DNS / CDN | Route 53 / CloudFront | Latency and failover routing |
| Load balancer | ALB / NLB | L7 routing / L4 performance |
| Containers / functions | ECS, EKS / Lambda | Fargate removes node management |
| Relational / key-value DB | RDS, Aurora / DynamoDB | Multi-AZ, global tables |
| Cache | ElastiCache (Redis/Valkey) | In private subnets |
| Queue / pub-sub / stream | SQS / SNS, EventBridge / Kinesis, MSK | Decoupling |
| Object storage | S3 | 11 nines durability |
NOWNeed: DNS / CDN | AWS service: Route 53 / CloudFront | Notes: Latency and failover routing
In interviews, name generic components first, then map them to services with a short reason.
Implementation
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ReadUploadsOnly", "Effect": "Allow", "Action": ["s3:GetObject"], "Resource": "arn:aws:s3:::acme-uploads/*" }, { "Sid": "SendToQueue", "Effect": "Allow", "Action": ["sqs:SendMessage"], "Resource": "arn:aws:sqs:us-east-1:123456789012:thumbnails" } ]}Complexity and performance
Each with 3+ AZs.
11 nines.
Trade-offs
Serverless minimizes operations and scales to zero but has limits (duration, cold starts); containers and VMs give more control.
RDS vs PostgreSQL on EC2: less work vs more tuning control.
Variants and related techniques
Blob Storage / Cloud Storage, AKS / GKE, Cosmos DB / Firestore, Service Bus / Pub/Sub.
Common mistakes
- Long-lived access keys.
Fix: Use IAM roles with temporary credentials and SSO.
- Databases in public subnets.
Fix: Keep data tiers private; allow access only from app security groups.
- Single-AZ deployments.
Fix: Spread across at least two AZs.
Interview questions
Design a highly available web app on AWS.
Route 53 and CloudFront in front of an ALB in public subnets across three AZs, containers on ECS Fargate or EKS in private subnets with auto scaling, Aurora Multi-AZ, ElastiCache for caching, S3 for static assets, SQS for async work, and CloudWatch for monitoring.
What is the difference between a security group and a NACL?
Security groups are stateful, instance-level allow rules; network ACLs are stateless, subnet-level allow and deny rules evaluated in order.
Practice problems
| Problem | Difficulty | What it trains |
|---|---|---|
| Map a URL shortener to AWS services | Easy | Service selection. |
| Design a VPC for a three-tier app | Medium | Subnets and security groups. |