Every AWS Service You Need To Know

System Design · Days 41–44 · 4 min read

Video Reference: Every AWS Service You Need To Know

1. Asli Problem Kya Hai? (The Core Why)

Picture Swiggy or IRCTC during peak hours.

  • Traffic spikes: 2–3x orders during festival season, 10x during a big match.
  • Low latency: Customers expect < 200 ms response for menu load and order placement.
  • High availability: 99.99% uptime is a must; a single point of failure can cost lakhs in revenue.
  • Data consistency: Seats in IRCTC, inventory in Swiggy must stay in sync across multiple regions.

If you ignore these, you get timeouts, data races, and disgruntled users. AWS services are the tools to solve these problems at scale.


2. Core Architecture & Mechanisms

Below is a quick tour of the key AWS services that make this possible. I’ll keep the engineering terms in English and explain the intuition in Hinglish.

Compute

ServiceUse CaseIntuition
EC2General-purpose serversLike hiring a dedicated dev who works 24/7, but you pay per hour.
LambdaEvent‑driven micro‑tasksThink of it as a “chef” who comes in only when an order is placed, does the job, and leaves.
ECS/EKSContainer orchestrationSame as Docker + Kubernetes but managed by AWS, so no “kube‑config” headaches.
Auto ScalingAuto‑spin up/down based on loadLike auto‑ordering fresh stock when inventory drops below threshold.

Storage

ServiceUse CaseIntuition
S3Static assets (images, videos)A huge, cheap, durable pantry that everyone can pull from.
EFSShared file system for containersLike a shared drive for multiple servers to read/write.
GlacierArchivalStore old receipts for compliance, not for quick access.

Database

ServiceUse CaseIntuition
RDS (Aurora)Relational data (orders, users)Managed MySQL/PostgreSQL with HA and automatic backups.
DynamoDBNoSQL key‑value (menu, cart)Extremely low latency, scales to millions of requests per second.
DocumentDBJSON‑style documentsMongoDB‑compatible, great for flexible schemas.

Networking & Delivery

ServiceUse CaseIntuition
VPCIsolated networkYour own office space with firewalls.
ALB/NLBLoad balancingTraffic‑shaper: forwards requests to healthy instances.
Route 53DNS & routingGoogle Maps for your domain, with health checks.
CloudFrontCDNMirror your content at edge locations so users load fast.

Caching & Messaging

ServiceUse CaseIntuition
ElastiCache (Redis/Memcached)In‑memory cacheQuick “cheat sheet” for hot data (e.g., popular menu items).
SQSQueue for decouplingLike a message board where workers pick jobs asynchronously.
SNSPub/Sub notificationsBroadcast alerts (e.g., “New order received”) to multiple subscribers.
KinesisReal‑time streamingStreaming analytics for order heatmaps, fraud detection.

Monitoring & Security

ServiceUse CaseIntuition
CloudWatchMetrics & logsDashboard for “how many orders per minute?”
CloudTrailAudit logsWho changed what, when.
IAMFine‑grained permissions“Only the order service can write to DynamoDB.”
KMSEncryptionKeys stored in a vault, not in your code.
GuardDutyThreat detectionAI that looks for suspicious activity.

Other Handy Services

  • CloudFormation / CDK – Infrastructure as code.
  • CodePipeline / CodeBuild – CI/CD.
  • Step Functions – Orchestrate complex workflows.
  • Direct Connect – Private link to on‑premise data centers.

3. Architecture Flow

graph TD
  A[User] -->|HTTPS| B[CloudFront]
  B -->|Cache Miss| C[Route53]
  C -->|DNS| D[ALB]
  D -->|Round‑Robin| E[EC2 / ECS]
  D -->|Serverless| F[Lambda]
  E -->|Read/Write| G[RDS (Aurora)]
  E -->|Read/Write| H[DynamoDB]
  E -->|Cache| I[ElastiCache]
  E -->|Queue| J[SQS]
  J -->|Worker| K[EC2/Lambda]
  K -->|Publish| L[SNS]
  L -->|Notify| M[Clients]
  E -->|Logs| N[CloudWatch]
  E -->|Audit| O[CloudTrail]
  • User hits CloudFront; if data is cached, response is immediate.
  • If not, request goes through Route 53 → ALB → backend compute.
  • Compute interacts with databases, cache, queues, and publishes events.
  • Monitoring and logging feed into CloudWatch and CloudTrail.

4. Production Case Study

Swiggy (Food Delivery)

ProblemAWS ServiceHow Swiggy Solves It
Real‑time order placementAPI Gateway + LambdaOrders trigger Lambda that writes to DynamoDB, publishes to SQS.
Menu and image deliveryS3 + CloudFrontImages stored in S3, served via CloudFront edge locations across India.
Inventory and seat managementRDS AuroraACID‑compliant orders, with read replicas for read‑heavy traffic.
NotificationsSNS + SQSPush notifications to drivers and customers.
Monitoring & Auto‑ScalingCloudWatch + Auto ScalingScale Lambda concurrency and EC2 instances based on CPU/Queue depth.
SecurityIAM + KMSFine‑grained roles for services, data encrypted at rest.

Result: Swiggy handles millions of orders daily with < 300 ms latency, 99.9% uptime, and zero data loss.


5. Trade‑offs (Pros vs Cons)

ProsCons
Managed services – No ops overhead (RDS, Lambda, S3).Vendor lock‑in – Switching away can be expensive.
Automatic scaling – Auto Scaling, Lambda concurrency.Cost spikes – Under‑utilization or traffic surges can inflate bills.
High availability – Multi‑AZ deployments, read replicas.Complexity – Many moving parts to orchestrate.
Security & compliance – IAM, KMS, GuardDuty.Cold starts – Lambda can be slow on first invocation.
Global reach – CloudFront, Route 53.Latency – Cross‑region traffic may add delays if not optimised.

6. System Design Interview Cheat Sheet

  • Start with requirements: traffic, latency, consistency, cost.
  • Pick compute: EC2 for long‑running services, Lambda for stateless ops, ECS/EKS for containers.
  • Choose database: RDS/Aurora for relational, DynamoDB for key‑value, DocumentDB for flexible.
  • Add caching: ElastiCache (Redis) for hot data, CloudFront for static assets.
  • Decouple with messaging: SQS/SNS/Kinesis to avoid tight coupling.
  • Secure & monitor: IAM roles, KMS, CloudWatch, CloudTrail, GuardDuty.

Remember: “If you can’t explain it in 5 minutes, you don’t understand it.” Good luck!