💻 Compute

ALB vs NLB vs GLB

 ALBNLBGLB
OSI Layer7 (HTTP/HTTPS)4 (TCP/UDP/TLS)3 (IP)
RoutingPath, host, header, queryFlow hash (fast)To virtual appliances
Static IPNo (DNS name)Yes (per AZ / EIP)No
Best forWeb apps, microservicesLow latency, gaming, IoTFirewalls, IDS/IPS inline

ECS vs EKS vs Fargate

 ECSEKSFargate
WhatAWS-native container orchestratorManaged KubernetesServerless compute for containers
Control planeManaged by AWS (free)Managed K8s (hourly fee)N/A - launch type
Use whenSimple, AWS-onlyK8s portability/ecosystemNo servers to manage (works with ECS/EKS)

Lambda vs Fargate vs EC2

 LambdaFargateEC2
UnitFunction (event)Container (task)Virtual machine
Max run time15 minNo hard limitNo limit
ScalingAutomatic, to zeroTask-basedAuto Scaling groups
Use whenEvent-driven, spikyLong-running containers, no server mgmtFull control / legacy

💾 Storage

EBS vs EFS vs FSx vs S3

 EBSEFSFSxS3
TypeBlockFile (NFS)File (Windows/Lustre)Object
AttachOne instance (or multi-attach io2)Many instances, multi-AZMany instancesOver HTTP API
ScopeSingle AZRegional (multi-AZ)VariesRegional, 11 9s durability
Use forBoot volumes, databasesShared Linux file storageWindows shares, HPCStatic assets, data lake, backup

S3 Standard-IA vs One Zone-IA vs Glacier

 Standard-IAOne Zone-IAGlacier Flexible
RetrievalMillisecondsMillisecondsMinutes to hours
AZsMulti-AZSingle AZMulti-AZ
Use forInfrequent, needs durabilityInfrequent, reproducible dataArchive
💡 Instance store vs EBS

Instance store is ephemeral (data lost on stop/terminate); EBS persists independently of the instance lifecycle.

📊 Databases

RDS vs Aurora vs DynamoDB vs Redshift

 RDSAuroraDynamoDBRedshift
ModelRelationalRelational (MySQL/PG compatible)NoSQL key-value/documentColumnar data warehouse
ScaleVertical + read replicasAuto-scaling storage, 15 replicasHorizontal, virtually unlimitedMPP cluster / serverless
Use forTraditional appsHigh-performance relationalMassive scale, low latencyOLAP / analytics

RDS Multi-AZ vs Read Replicas

Multi-AZ

  • Purpose: high availability / failover
  • Synchronous standby, not readable
  • Automatic failover on outage

Read Replicas

  • Purpose: scale read traffic
  • Asynchronous, readable
  • Can be promoted to standalone

ElastiCache Redis vs Memcached

 RedisMemcached
Data structuresRich (lists, sets, sorted sets)Simple key-value
Persistence / replicationYes (backups, replicas, Multi-AZ)No
Use forLeaderboards, pub/sub, HA cacheSimple, multi-threaded caching

🌐 Networking

Security Group vs Network ACL

 Security GroupNetwork ACL
LevelInstance / ENISubnet
StateStateful (return auto-allowed)Stateless (allow both directions)
RulesAllow onlyAllow and Deny
EvaluationAll rulesIn order, lowest number first
⚠ Ephemeral ports

Because NACLs are stateless, you must allow the ephemeral port range (1024-65535) for return traffic. Security Groups handle this automatically.

VPC Peering vs Transit Gateway vs PrivateLink

 VPC PeeringTransit GatewayPrivateLink
Topology1:1Hub-and-spoke (many)Expose a single service
TransitiveNoYesN/A
Overlapping CIDRsNot allowedNot allowedWorks despite overlap

NAT Gateway vs Internet Gateway vs Egress-Only IGW

 NAT GatewayInternet GatewayEgress-Only IGW
DirectionOutbound only (IPv4)Inbound + outboundOutbound only (IPv6)
SubnetPrivate -> internetPublic subnetPrivate IPv6 -> internet

📩 Messaging & Integration

SQS vs SNS vs EventBridge vs Kinesis

 SQSSNSEventBridgeKinesis
PatternQueue (pull)Pub/sub (push)Event bus + routing rulesStreaming
ConsumersOne (per message)Many subscribersMany targets, filteredMany, can replay
OrderingFIFO optionFIFO optionNoPer-shard order + replay
Use forDecouple, buffer workFan-out notificationsSaaS/AWS event routingReal-time analytics, big streams

Step Functions: Standard vs Express

 StandardExpress
DurationUp to 1 yearUp to 5 minutes
RateLower throughputVery high throughput
Use forLong-running, auditable workflowsHigh-volume, short event processing

🔒 Security & Identity

SCP vs IAM Policy vs Permission Boundary

 SCPIAM PolicyPermission Boundary
ScopeWhole account/OU (Org)User/role/groupMax perms for a principal
Grants access?No - only limitsYesNo - only caps
Use forOrg-wide guardrailsDay-to-day permissionsDelegated admin limits

Cognito User Pool vs Identity Pool

User Pool

  • User directory & sign-in
  • Issues JWT tokens
  • Answers "who is this user?"

Identity Pool

  • Exchanges identity for temporary AWS credentials
  • Maps to IAM roles
  • Answers "what AWS resources can they use?"

Secrets Manager vs Parameter Store

 Secrets ManagerParameter Store
RotationBuilt-in automaticManual (Lambda + EventBridge)
CostPer secret/monthStandard tier free
Use forDB creds, rotating secretsConfig values, non-rotating secrets

KMS vs CloudHSM

 KMSCloudHSM
TenancyMulti-tenant managedSingle-tenant dedicated HSM
ControlAWS-managed FIPS 140-2You fully control keys
Use forMost encryption needsStrict compliance, custom key store

🚀 Deployment & DR

Deployment strategies

StrategyBehaviorDowntime / rollback
All-at-onceReplace everything at onceDowntime; fast but risky
RollingReplace in batchesReduced capacity during deploy
Blue/GreenNew env beside old, then switchZero downtime, instant rollback
CanarySmall % first, then restLimited blast radius

DR strategies (RTO/RPO vs cost)

StrategyRTO/RPOCost
Backup & RestoreHoursLowest
Pilot LightTens of minutesLow
Warm StandbyMinutesMedium
Multi-Region Active-ActiveNear zeroHighest

📈 Analytics & AI

Athena vs Redshift vs EMR

 AthenaRedshiftEMR
WhatServerless SQL on S3Managed data warehouseManaged Hadoop/Spark clusters
Pay forData scanned per queryCluster / serverless capacityCluster runtime
Use forAd-hoc queries, occasionalFrequent BI on structured dataBig data processing, custom frameworks

Kinesis Data Streams vs Data Firehose

 Data StreamsData Firehose
ManagementYou manage shards/consumersFully managed delivery
LatencyReal-time (sub-second)Near real-time (buffered)
Use forCustom real-time processing, replayLoad to S3/Redshift/OpenSearch

Fine-tuning vs RAG vs Prompt Engineering

 Prompt EngineeringRAGFine-tuning
Changes model?NoNo (adds context)Yes (weights)
Uses private dataIn the promptRetrieved at query timeBaked into the model
Effort / costLowestMediumHighest
📝 Contribute

Spot a missing pair? Add it to the cheat sheet source in build.py and open a pull request.

🍉 Decision Trees

Fast "which service?" flowcharts for the most common exam decision points.

Which compute service?

flowchart TD
  A{Need to run code?} --> B{Event-driven &
short-lived under 15 min?} B -->|Yes| L[AWS Lambda] B -->|No| C{Containers?} C -->|Yes| D{Want to manage servers?} D -->|No| F[Fargate] D -->|Yes, Kubernetes| K[EKS] D -->|Yes, AWS-native| E[ECS on EC2] C -->|No| G{Full OS control /
legacy app?} G -->|Yes| H[EC2] G -->|No| I[Elastic Beanstalk /
App Runner]
Choosing a compute service based on workload shape.

Which database?

flowchart TD
  A{Data model?} --> B{Relational?}
  B -->|Yes| C{Need MySQL/PostgreSQL
high performance?} C -->|Yes| AU[Aurora] C -->|Standard engine| RDS[RDS] C -->|Data warehouse / OLAP| RS[Redshift] B -->|No| D{Access pattern?} D -->|Key-value, massive scale| DDB[DynamoDB] D -->|In-memory cache| EC[ElastiCache] D -->|Document| DOC[DocumentDB] D -->|Graph| NEP[Neptune] D -->|Time series| TS[Timestream]
Picking the right AWS database for the data model and access pattern.

Which S3 storage class?

flowchart TD
  A{Access frequency?} --> B{Frequently accessed?}
  B -->|Yes| STD[S3 Standard]
  B -->|Unknown / changing| INT[S3 Intelligent-Tiering]
  B -->|Infrequent| C{Need multi-AZ
durability?} C -->|Yes| IA[S3 Standard-IA] C -->|Reproducible data| OZ[S3 One Zone-IA] A --> D{Archive?} D -->|Minutes retrieval| GIR[Glacier Instant Retrieval] D -->|Hours retrieval| GFR[Glacier Flexible Retrieval] D -->|12+ hours, lowest cost| GDA[Glacier Deep Archive]
Selecting an S3 storage class by access frequency and durability needs.