Study Guide925 words

EC2 Instance Types, Families, and Sizes: A Comprehensive Study Guide

Instance types, families, and sizes (for example, memory optimized, compute optimized, virtualization)

EC2 Instance Types, Families, and Sizes

This guide explores the diverse range of Amazon EC2 instance types, categorized by their hardware profiles and optimized use cases. Understanding how to match a workload to the correct instance family is a core competency for the AWS Certified Solutions Architect exam.

Learning Objectives

By the end of this guide, you should be able to:

  • Identify the five primary EC2 instance families and their target workloads.
  • Explain the "burstable" performance model of the T-series instances.
  • Interpret EC2 naming conventions (e.g., m5ad.large) to identify processor types and capabilities.
  • Select appropriate instance sizes based on vCPU, memory, and networking requirements.
  • Describe the process for vertically scaling (resizing) an EC2 instance.

Key Terms & Glossary

  • vCPU: A virtual Central Processing Unit. It represents a portion of the physical CPU assigned to the instance.
  • GiB (Gibibyte): A standard for measuring data space (230bytes).ItisslightlylargerthanaGigabyte(1092^{30} bytes). It is slightly larger than a Gigabyte (10^9 bytes).
  • Burstable Performance: A baseline level of CPU performance that can "burst" to higher levels by consuming accumulated CPU credits.
  • Graviton2: An AWS-designed processor based on the Arm architecture, often offering better price-performance than x86 counterparts.
  • Ephemeral Storage: Local SSD storage (Instance Store) that is physically attached to the host server but is lost if the instance is terminated.

The "Big Idea"

The fundamental goal of EC2 instance selection is Optimization. AWS provides over 60 instance types to ensure you don't pay for "compute waste" (excess resources) while avoiding "compute bottlenecks" (resource starvation). Choosing the right instance is a balancing act between Compute, Memory, and Storage requirements against your budget.

Formula / Concept Box

Instance Naming Convention

ComponentExampleMeaning
FamilymGeneral Purpose (Balance of resources)
Generation55th generation of that hardware type
Attributesg / a / dg: Graviton (Arm); a: AMD; d: Instance Store (Disk)
SizelargeDefines the scale of vCPU, RAM, and Bandwidth

[!TIP] Think of instance families using the mnemonic FIGHT DR MC PXZ (Fast, I/O, Graphics, High throughput...). Or more simply: C for Compute, R for RAM (Memory), M for Medium (General), I for I/O (Storage).

Visual Anchors

Workload Selection Flowchart

Loading Diagram...

Instance Anatomy

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds

Hierarchical Outline

  1. General Purpose (M, T, A families)
    • Best for: Web servers, small databases, and development environments.
    • T-Series (T2, T3, T4g): Burstable performance. Accumulate CPU credits during low usage.
    • M-Series (M5, M6i, M6g): Consistent performance for production workloads.
  2. Compute Optimized (C family)
    • Best for: Batch processing, media transcoding, high-performance web servers, and scientific modeling.
    • Features: High vCPU-to-memory ratio.
  3. Memory Optimized (R, X, Z families)
    • Best for: High-performance databases (RDS), real-time big data analytics, and large in-memory caches (Redis).
    • Notable Types: X1e offers up to 3.9 TB of RAM.
  4. Storage Optimized (I, D, H families)
    • Best for: NoSQL databases (Cassandra, MongoDB), data warehousing, and distributed file systems.
    • Features: High-sequential read/write and low-latency local storage.
  5. Accelerated Computing (P, G, F families)
    • Best for: Machine Learning (training/inference), 3D rendering, and financial modeling.
    • Hardware: Uses NVIDIA GPUs or FPGAs.

Definition-Example Pairs

  • Burstable Instance: An instance that provides a baseline level of CPU and can scale up temporarily.
    • Example: A low-traffic blog that occasionally gets a spike in visitors from a social media post.
  • Graviton Processor: An ARM-based CPU designed by AWS for cloud-native workloads.
    • Example: Moving a Python microservice from m5.large (Intel) to m6g.large (Graviton) to reduce costs by 20%.
  • Instance Resizing: Changing the hardware profile of an existing EC2 instance.
    • Example: Stopping a t3.micro instance, changing the type to t3.medium, and starting it back up to handle increased memory demand.

Comparison Tables

FamilyKey StrengthTypical Service/Workload
Compute (C6i)CPU Cycle DensityVideo Encoding / Gaming Servers
Memory (R6i)High RAM (GiB)SAP HANA / In-memory Databases
Storage (I3)NVMe SSD I/OData Warehousing / NoSQL
General (M5)BalancedTypical Application Servers

Worked Examples

Problem 1: Selecting for a High-Traffic SQL Database

Scenario: A company is migrating a high-traffic PostgreSQL database to EC2. The database requires high memory for caching and fast networking but doesn't need high GPU performance. Solution:

  1. Analyze Requirements: High RAM + Fast Network.
  2. Identify Family: Memory Optimized (R family).
  3. Select Type: R6i.xlarge or similar. This provides the memory bandwidth needed for indexing and query caching.

Problem 2: Scaling a Web Server

Scenario: Your web server is running on a t2.micro but is constantly running out of CPU credits and becoming unresponsive. Steps:

  1. Stop the instance (Elastic IP or Load Balancer handles the traffic swap if in HA).
  2. Modify instance type to a larger size (e.g., t2.small) or a non-burstable type (e.g., m5.large).
  3. Start the instance. The underlying host is updated, and the instance now has more resources.

Checkpoint Questions

  1. What is the main difference between a t4g.nano and a t2.nano? (Answer: The t4g uses the AWS Graviton2 Arm processor, while t2 uses traditional x86 architecture.)
  2. Which instance family would you choose for a cluster of nodes performing distributed file system tasks like HDFS? (Answer: Storage Optimized - D or I families.)
  3. Can you change an EC2 instance type while the instance is running? (Answer: No, the instance must be stopped before the instance type can be changed.)
  4. What measurement unit does AWS use for RAM, and how does it differ from a Gigabyte? (Answer: GiB (Gibibyte); it uses a base-2 power (10243)ratherthanbase10(100031024^3) rather than base-10 (1000^3).)

Ready to study AWS Certified Solutions Architect - Associate (SAA-C03)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free