Amazon EC2
Resizable virtual servers in the cloud — you pick the hardware profile, AWS runs the physical machine.
Verified against AWS documentation · 2026-08-28
Key facts
- 01You own everything from the OS up (patching, scaling, security config); AWS owns the hypervisor down — the classic shared responsibility split
- 02Instance families map to workload shape: general purpose (T/M), compute (C), memory (R/X), storage (I/D), accelerated (P/G) — the letter tells you what it's built for
- 03Purchasing options: On-Demand (no commitment), Reserved/Savings Plans (1 or 3 yr commitment), Spot (spare capacity, interruptible with 2-min warning), Dedicated Host/Instance (single-tenant hardware)
- 04Security groups are stateful instance-level firewalls (allow rules only); EBS root volumes persist through stop/start, instance store is wiped — it lives on the physical host
Exam triggers
Phrases and scenarios that point here.
- "Full control over the OS", "install custom/legacy software", "lift-and-shift migration" → EC2 over managed services
- Fault-tolerant, interruptible, or flexible-timing workloads at lowest cost → Spot
- Per-socket / per-core BYOL licensing or strict compliance isolation → Dedicated Host (not Dedicated Instance)
- Steady predictable usage → Reserved Instances or Savings Plans; spiky or unknown → On-Demand
Not this service
- Run code on events without managing servers, under 15 minutes → Lambda
- Run containers without choosing or managing instances → Fargate
Use cases
- 01Lift-and-shift of a legacy app that needs a specific OS version, agent, or kernel module a managed service won't allow
- 02Web tier in an Auto Scaling group behind a load balancer — instances are cattle, not pets; any one can die and be replaced
- 03Overnight batch and rendering jobs on Spot, where a 2-minute interruption just means the job re-queues, in exchange for the deepest discount
- 04Self-managed databases or software with per-core licensing pinned to a Dedicated Host to satisfy the license auditor
- 05GPU instances (P/G family) spun up for ML training runs, then terminated — paying for hours of hardware instead of owning it
How it's charged
- 01Billed per second of running time (60-second minimum on Linux), with the rate set by instance type, Region, and OS
- 02Stopped instances stop compute charges — but attached EBS volumes, Elastic IPs, and public IPv4 addresses keep billing regardless
- 03Spot pricing floats with spare capacity; Reserved Instances and Savings Plans trade a 1–3 year commitment for a discount, billed whether you use the commitment or not
- 04Dedicated Hosts bill per host, not per instance — you pay for the whole physical box however many instances you pack onto it
- 05Data transfer out to the internet is billed separately; inbound transfer is free