Why it matters

EC2 is where most cloud spend goes. Understanding instance types, spot pricing, and rightsizing can cut compute bills by 50 to 80 percent for typical workloads.

Advertisement

The architecture

Instance types are family + size. Family (t3, m5, c5, r5, i3) determines resource ratios: compute-optimized, memory-optimized, storage-optimized, general-purpose. Size (small to metal) determines absolute resources.

AMIs are pre-baked disk images. Amazon-provided (Amazon Linux, Ubuntu, Windows) or custom. Launching an EC2 boots from an AMI.

EC2 componentsInstance typefamily + sizeAMIboot imageEBS volumesattached storageInstance metadata service exposes IAM role credentials to code running on the VM
EC2 launch parameters.
Advertisement

How it works end to end

EBS (Elastic Block Store) provides persistent block storage. Volumes attach to EC2 instances. Snapshots enable backup and cloning.

Placement groups control physical placement: cluster (same rack for low latency), spread (different racks for HA), partition (partitioned by rack).

Spot instances give 60-90% discount for unused capacity. Can be terminated at 2 minutes notice. Great for fault-tolerant workloads.