Skip to main content
Welcome. This guide explains EC2 instance families and how to size instances for optimal performance. You do not need to memorize every SKU — focus on categories, typical CPU:memory ratios, and common use cases to make informed design and exam decisions. Key EC2 categories:
  • General Purpose
  • Compute Optimized
  • Memory Optimized
  • Storage Optimized
  • Accelerated Computing (GPU/FPGAs)
  • HPC Optimized
An infographic titled "EC2 Instance Types" with five colored cards—General Purpose, Compute Optimized, Memory Optimized, Storage Optimized, and GPU Instances—each showing an icon and short descriptions of typical workloads like web servers, databases, big data analytics, and machine learning (© KodeKloud).
Processor and capability suffixes (quick reference)
  • A trailing g generally indicates Graviton (ARM-based) processors.
  • A trailing a often indicates AMD-based processors.
  • Other suffixes can indicate enhanced networking, higher I/O, or specialized capabilities (for example, n for network enhancements in some families).
  • Many instance lines offer variants to change the vCPU-to-memory ratio (flexible options within a family).
An infographic titled "Type of Processor or Additional Capabilities" showing five icons and labels: Powered by Graviton processors (AWS), Optimized for higher I/O, Instances utilizing AMD processors, Instances with enhanced networking capabilities, and Customizable vCPU and memory ratios (Flex). Each icon represents a different instance type or extra capability for cloud servers.
General purpose
  • Balanced CPU, memory, and networking — suitable for a broad range of workloads: web servers, small databases, CI/CD runners, and code repositories.
  • Typical CPU:memory ratio (approximate): 1 vCPU : 4 GiB RAM.
  • Common families:
    • M-series — balanced general-purpose.
    • T-series — burstable (T3, T4g, etc.) that use a CPU-credit model.
A presentation slide titled "General Purpose" showing three numbered points about balanced compute, memory and networking resources; suitability for diverse workloads; and being ideal for web servers and code repositories.
A presentation slide titled "General Purpose" comparing two instance families. On the left is a green "M Series" card listing many M instance types, and on the right is an orange "T Series" card listing T4g, T3, T3a, and T2 with short descriptive text beneath each.
If you are unfamiliar with CPU credits for burstable instances (T-series), review how CPU credits work — exam questions and real-world designs commonly test this concept. Useful resources: AWS T-series documentation and CloudWatch metrics for monitoring credit balance.
Compute optimized
  • Designed for CPU-bound applications: scientific modeling, batch processing, media transcoding, gaming and ad servers, and CPU-based ML inference.
  • Typical CPU:memory ratio (approximate): 1 vCPU : 2 GiB RAM.
  • Common family: C-series (C5, C6, C7 variants). These focus on higher single-core and multi-core CPU performance and often provide features for low-latency compute.
A presentation slide titled "Compute Optimized" with a pink icon of a hand holding a cube. It lists two points saying these instances are best for compute-bound applications needing high-performance processors and are suitable for batch processing, media transcoding, HPC, gaming servers, ad servers, and ML inference.
A presentation slide titled "Compute Optimized" with a green "C Series" card in the center. The card lists various C‑series instance names such as C7g, C7gn, C7i, C6g, C5, and C4.
Memory optimized
  • Best for memory-intensive workloads: large in-memory databases, in-memory analytics, and caches.
  • Typical CPU:memory ratio (approximate): 1 vCPU : 8 GiB RAM.
  • Common families: R-series (memory optimized), X-series (high memory), U-series (very large memory footprints), Z-series (high single-thread performance with memory).
  • Databases often run on memory-optimized instances; pair with Provisioned IOPS (io2/io2 Block Express) when high I/O performance is required.
A slide titled "Memory Optimized" showing four colored boxes for R Series, U Series, X Series, and z Series that list example instance types and brief notes. Each box highlights those instance families' high-memory use cases (databases, big data, ultra-memory workloads).
Accelerated computing (GPU / FPGAs)
  • Referred to as “accelerated computing”; includes GPUs and FPGAs for parallel workloads.
  • Ideal for ML training, GPU-accelerated inference, graphics rendering, and high-throughput video transcoding.
  • Families to know: P-series (training/compute GPUs), G-series (graphics), DL/Inf-series (deep learning and inference accelerators), F-series (FPGAs), VT, TRN, and others.
A slide titled "Accelerated Computing" showing three colored cards labeled P Series, G Series, and DL Series with example instance names (e.g., P5, G6, DL1) and short descriptions. It compares GPU instance families and their typical use cases like general GPU compute, graphics workloads, and deep learning.
A slide titled "Accelerated Computing" showing four colored cards for F Series (F1), Inf Series (Inf2, Inf1), VT Series (VT1), and Trn Series (Trn1). Each card includes a short description of use cases like FPGAs, ML inference, video transcoding, and training/data processing.
GPU and FPGA instances can be significantly more expensive and may have quota limits. Always validate accelerator requirements with representative benchmarks and watch for driver, CUDA/cuDNN, and AMI compatibility before committing to a family.
Storage optimized
  • Two main types:
    • High IOPS / low-latency local NVMe storage (I-series) — ideal for databases requiring local block performance.
    • Dense capacity storage (D-series / H-series) — suitable for large datasets, data warehousing, and distributed file systems.
  • H-series focuses on throughput and capacity, often used with big-data frameworks such as EMR or Hadoop.
Slide titled "Storage Optimized" showing three colored cards for I Series, D Series, and H Series with example instance types (e.g., I4g, D3, H1). Each card has a brief usage note: high IOPS/low-latency local storage, dense storage/data warehousing, and high disk throughput for distributed file systems.
HPC optimized
  • Instances and families tailored for tightly-coupled high-performance computing clusters — often denoted with an HPC-focused identifier in the name.
  • Use cases: large simulations, computational fluid dynamics, scientific modeling, and workloads that require low-latency networking and specialized interconnects.
A presentation slide titled "HPC Optimized" with a green rounded box labeled "HPC Series" listing instance types: Hpc7g, Hpc7a, Hpc6id, Hpc6a. The slide shows a small "© Copyright KodeKloud" note at the bottom.
Summary of approximate ratios and primary purposes
A presentation slide titled "Summary" containing a table that compares cloud instance categories by their characteristics and typical use cases. Rows include General Purpose, Compute Optimized, Memory Optimized, Storage Optimized, Accelerated Computing, and HPC Optimized.
Sizing considerations
  • Instance sizes: nano, micro, small, medium, large, xlarge, then multiples such as 2xlarge, 4xlarge, 8xlarge, 16xlarge, 24xlarge, 32xlarge — typically powers of two after xlarge, though families and generations may vary.
  • Choose vertical scaling (larger instance) vs horizontal scaling (more instances) based on architecture:
    • Stateless web services: prefer horizontal scaling (auto-scaling groups).
    • Stateful systems (databases): may require vertical scaling or architectural patterns like read replicas, sharding, or clustering to enable horizontal scaling.
  • Baseline performance and right-sizing: use monitoring and optimizer tools to validate choices and adjust.
A slide titled "Sizing Amazon EC2 Instance Types" showing six orange microchip icons of increasing size labeled Nano, Micro, Small, Medium, Large, and XLarge. The graphic illustrates increasing EC2 instance sizes (© KodeKloud).
Guidance for selecting vertical vs horizontal scaling Monitor actual CPU, memory, disk I/O, and network metrics with CloudWatch and use AWS Compute Optimizer to get right-sizing recommendations:
A presentation slide titled "Size Selection – Considerations" showing four numbered colorful icons for Baseline performance, Scalability needs, Cost efficiency, and Performance metrics. Each item is shown in a rounded square with a large white number overlay.
Final tips
  • For exams and architecture design, focus on categories, typical CPU:memory ratios, and common use cases rather than memorizing SKUs.
  • Prefer newer generation instances (e.g., R8 vs R4) for better price/performance when feasible.
  • Always benchmark with a representative workload and validate performance with monitoring and optimizer tools before large-scale migration or long-term commitments.
That’s the overview of EC2 instance families and sizing considerations—use monitoring, benchmarking, and the guidance above to select the right instance family and size for your workload.

Watch Video