3.1 EC2 Instance Types, Purchasing Options, and Placement Groups

Key Takeaways

  • EC2 instance families are categorized by purpose: General Purpose (M/T), Compute Optimized (C), Memory Optimized (R/X), Storage Optimized (I/D/H), and Accelerated Computing (P/G/F).
  • On-Demand provides maximum flexibility; Reserved Instances (1-3 year) save up to 72%; Savings Plans save up to 72% with more flexibility; Spot Instances save up to 90% but can be interrupted.
  • Placement groups control instance placement: Cluster (low latency in same AZ), Spread (max 7 per AZ, high availability), Partition (large distributed systems like HDFS/Cassandra).
  • For the exam, match the workload to the correct instance family: compute-intensive → C-series, memory-intensive → R-series, storage-intensive → I/D-series.
  • Spot Instances are ideal for fault-tolerant, flexible workloads like batch processing, data analysis, and CI/CD — NOT for databases or stateful applications.
Last updated: March 2026

EC2 Instance Types, Purchasing Options, and Placement Groups

Quick Answer: Match workloads to instance families: General (M/T), Compute (C), Memory (R/X), Storage (I/D), Accelerated (P/G). Use On-Demand for flexibility, Reserved/Savings Plans for steady-state (up to 72% off), and Spot for fault-tolerant workloads (up to 90% off). Placement groups control physical placement for performance or availability.

EC2 Instance Families

Instance Naming Convention

Example: m5.xlarge

  • m = family (General Purpose)
  • 5 = generation
  • xlarge = size (vCPUs and memory)

Instance Families

FamilyPurposeExamplesUse Cases
T (Burstable)General purpose, burstablet3.micro, t3.mediumDev/test, small websites, microservices
M (General)General purpose, balancedm7i.large, m6g.xlargeWeb servers, app servers, small databases
C (Compute)Compute optimizedc7g.xlarge, c6i.2xlargeBatch processing, ML inference, gaming, HPC
R (Memory)Memory optimizedr7g.2xlarge, r6i.4xlargeIn-memory databases, real-time analytics, SAP
X (Extra Memory)Extreme memoryx2idn.32xlargeSAP HANA, large in-memory databases
I (IO)Storage optimized (NVMe SSD)i4i.xlargeNoSQL databases, data warehousing
D (Dense)Storage optimized (HDD)d3.xlargeMapReduce, HDFS, distributed file systems
H (High Disk)Storage optimized (HDD)h1.2xlargeMapReduce, distributed computing
P (GPU)Accelerated computingp5.48xlargeML training, deep learning
G (Graphics)Graphics-intensiveg5.xlargeVideo encoding, 3D rendering, game streaming
Inf (Inference)ML inferenceinf2.xlargeML inference at low cost
Trn (Training)ML trainingtrn1.32xlargeML training at low cost

On the Exam: "Compute-intensive batch processing" → C-series. "In-memory caching with large datasets" → R-series. "Burstable web server for development" → T-series. "Machine learning training" → P-series or Trn-series.

EC2 Purchasing Options

OptionCommitmentSavingsBest For
On-DemandNone0% (baseline)Unpredictable workloads, short-term, testing
Reserved Instance (RI)1 or 3 yearsUp to 72%Steady-state, predictable usage (databases, core apps)
Savings Plans1 or 3 years ($/hour commitment)Up to 72%Flexible across instance types/Regions/OS
Spot InstancesNoneUp to 90%Fault-tolerant, flexible workloads (batch, CI/CD, analytics)
Dedicated HostsOn-Demand or ReservedVariesLicense compliance (per-socket, per-core licensing)
Dedicated InstancesOn-Demand pricingSmall premiumCompliance (hardware not shared with other accounts)
Capacity ReservationsNone (pay On-Demand rate)0% (guarantees capacity)Ensure capacity availability in a specific AZ

Reserved Instance Details

TypeFlexibilityDiscount
Standard RIFixed instance type, platform, tenancyHighest discount (up to 72%)
Convertible RICan change instance type, platform, tenancyLower discount (up to 66%)

Payment options: All Upfront (max discount) > Partial Upfront > No Upfront (least discount)

Savings Plans

Plan TypeCoversFlexibility
Compute Savings PlanEC2, Lambda, FargateAny instance family, size, OS, Region, tenancy
EC2 Instance Savings PlanEC2 onlyFixed instance family and Region; flexible size, OS

On the Exam: "Most cost-effective for steady-state database workload running 24/7" → Reserved Instance (3-year, All Upfront). "Batch processing that can be interrupted" → Spot Instance.

Spot Instance Details

FeatureDetail
SavingsUp to 90% off On-Demand
InterruptionAWS can reclaim with 2-minute warning
Best forBatch jobs, data analysis, image processing, CI/CD, testing
NOT forDatabases, stateful applications, critical workloads
Spot FleetMix of Spot and On-Demand instances with target capacity
Spot BlockDeprecated — use Spot with interruption handling instead

Placement Groups

TypeDescriptionUse CaseLimits
ClusterAll instances in same rack, same AZLow-latency HPC, big data (10 Gbps between instances)Single AZ only
SpreadInstances on different hardware (racks)High availability for critical instancesMax 7 instances per AZ
PartitionInstances in logical partitions on different racksHDFS, HBase, Cassandra (rack-aware distributed systems)Up to 7 partitions per AZ

On the Exam: "Low network latency between EC2 instances for an HPC application" → Cluster placement group. "Maximize availability for a small set of critical instances" → Spread placement group.

Test Your Knowledge

A company runs a high-performance computing (HPC) application that requires the lowest possible network latency between EC2 instances. Which placement group should they use?

A
B
C
D
Test Your Knowledge

A data analytics workload runs for 3 hours daily and can tolerate interruptions. Which EC2 purchasing option provides the MOST cost savings?

A
B
C
D
Test Your Knowledge

Which EC2 instance family is BEST for an application that requires large amounts of memory for an in-memory database like Redis?

A
B
C
D