AWS EC2 (Elastic Compute Cloud)
AWS's foundational virtual servers — the instance-type catalog, pricing models, and the rent-vs-commit math that underpins most AWS bills.
Last reviewed: July 25, 2026
What is EC2?
Amazon EC2 (Elastic Compute Cloud) is AWS’s core virtual machine service — launch instances in minutes, pick from hundreds of types, pay by the second. It’s the compute primitive nearly everything else builds on or competes with, and understanding its two axes — instance families and pricing models — is most of what makes an AWS bill sensible or shocking.
Reading the instance catalog
Instance names encode purpose: the family letter tells you the balance. General purpose (M, T) balance CPU/memory; compute-optimized (C) favor CPU; memory-optimized (R, X) favor RAM for databases and caches; storage-optimized (I, D) bring fast local disk; accelerated (P, G, Inf/Trn) carry GPUs and AI accelerators. The T-family is a special trap-and-treasure: burstable instances that accrue CPU credits when idle and spend them under load — brilliant for spiky low-average workloads, disastrous for sustained load (they throttle hard once credits exhaust, the classic “why is my t3 suddenly slow” incident). Matching family to workload is the first optimization.
The pricing math that dominates the bill
On-demand is the flexible default (highest per-hour). Savings Plans / Reserved Instances commit to 1–3 years for 30–70% off — the single biggest lever for stable baseline load, and the FinOps move that pays for itself. Spot instances use spare capacity at up to ~90% off but can be reclaimed with two minutes’ notice — transformative for fault-tolerant, interruptible work (batch, CI, stateless web behind a load balancer) and a mistake for anything that can’t checkpoint. The mature pattern blends all three: reserved/savings for the floor, on-demand for the variable middle, spot for the interruptible top.
What people get wrong
- On-demand for stable baseline load — leaving 30–70% on the table by not committing.
- T-family for sustained workloads — running out of CPU credits and getting throttled.
- Ignoring spot for batch/CI — paying 10× for interruptible work that could ride reclaimable capacity.
Primary source: Amazon EC2 documentation
Instance Types and Pricing Models
EC2 offers a large catalog of instance types optimized for different workload profiles — compute-optimized for CPU-intensive tasks, memory-optimized for large in-memory workloads like databases, and GPU instances for machine learning and graphics workloads — letting teams match instance characteristics closely to their actual application needs rather than over-provisioning a one-size-fits-all instance. EC2’s pricing models add another layer of optimization opportunity: On-Demand pricing offers maximum flexibility at the highest per-hour rate, Reserved Instances and Savings Plans offer significant discounts in exchange for a one- or three-year usage commitment, and Spot Instances offer the deepest discounts (often 70-90% off On-Demand) in exchange for the instance potentially being reclaimed by AWS with short notice when capacity is needed elsewhere — a tradeoff well suited to fault-tolerant batch or stateless workloads that can handle interruption.
Historical figures and technical concepts for informational purposes only. Not technical, professional, legal, or financial advice. Sources: Official Documentation.