Complete Guide to AWS EC2 Instance Types: What t2, m5, c6i, g5, and More Mean

Author: Ferry Dermawan

Date:

Tags: aws

Amazon Web Services (AWS) offers a wide range of EC2 instance types, each designed for specific workloads. If you have ever wondered what those names like t2.medium, m5.large, c6i.32xlarge, or g5.2xlarge mean, this guide will help you decode them and choose the best fit for your application.


What Is an EC2 Instance?

An EC2 instance is a virtual server running on AWS infrastructure. Each instance type has a specific balance of CPU, memory, storage, and networking capacity, optimized for different use cases such as general computing, machine learning, or high-performance databases.


How to Read EC2 Instance Names

An instance name like c6i.32xlarge can be broken down into three main parts:

  • Prefix letter(s) → indicates the instance family (e.g., t, m, c, g).
  • Generation number → shows the version (e.g., 6 is newer than 5).
  • Suffix / size → defines hardware details (e.g., .large, .xlarge, .metal).

Example:

  • c6i.32xlargeCompute Optimized, 6th generation, Intel CPU (i), 32xlarge size.

EC2 Instance Families Explained

1. General Purpose

  • t Family – Burstable general purpose (e.g., t2, t3, t4g).
    Best for: Low-traffic websites, dev/test workloads.

  • m Family – Balanced general purpose (e.g., m5, m6i, m7g).
    Best for: Application servers, small to medium databases, general workloads.


2. Compute Optimized

  • c Family – High CPU power compared to memory (e.g., c5, c6i).
    Best for: High-performance computing, batch processing, game servers.

3. Memory Optimized

  • r Family – High memory per vCPU (e.g., r5, r6g).
    Best for: In-memory caches, big data, real-time analytics.

  • x Family – Extra memory (e.g., x1e, x2idn).
    Best for: Large in-memory databases like SAP HANA.

  • z Family – High frequency CPUs + large memory (e.g., z1d).
    Best for: EDA, financial simulations, latency-sensitive workloads.


4. Storage Optimized

  • d Family – Dense HDD storage (e.g., d2).
    Best for: Data warehouses, Hadoop, distributed storage.

  • i Family – High IOPS NVMe SSD (e.g., i3, i4i).
    Best for: NoSQL databases, OLTP.

  • h Family – High throughput HDD (e.g., h1).
    Best for: Data-intensive workloads with sequential reads/writes.


5. Accelerated Computing

  • g Family – GPU for graphics/ML inference (e.g., g4dn, g5).
    Best for: Machine learning inference, 3D rendering, remote workstations.

  • p Family – GPU for ML training/HPC (e.g., p3, p4d).
    Best for: Deep learning training, scientific computing.

  • f Family – FPGA instances (e.g., f1).
    Best for: Custom hardware acceleration.

  • inf Family – AWS Inferentia chip (e.g., inf1).
    Best for: AI inference at low cost.

  • trn Family – AWS Trainium chip (e.g., trn1).
    Best for: Deep learning training at scale.


Instance Size Naming

Each instance has multiple sizes, for example:

  • .nano, .micro, .small – Very small workloads.
  • .medium, .large – Moderate workloads.
  • .xlarge, .2xlarge, .4xlarge.32xlarge – Increasing CPU & RAM.
  • .metal – Bare metal access (direct hardware).

Example:

  • m6i.large → 2 vCPU, 8 GB RAM.
  • m6i.32xlarge → 128 vCPU, 512 GB RAM.

Choosing the Right Instance

When selecting an EC2 instance, consider:

  1. Workload type – Is it CPU-bound, memory-intensive, or GPU-dependent?
  2. Cost efficiency – Graviton (g) instances often provide better price/performance.
  3. Scalability – Start small and scale up as demand grows.
  4. Storage needs – Do you need high IOPS SSDs (i family) or dense HDDs (d family)?

Quick Reference Table

Family Optimized For Example Instances Best Use Cases
t Burstable General t3, t4g Dev/test, small apps
m Balanced General m5, m6i, m7g Web/app servers, DBs
c Compute c5, c6i HPC, game servers
r Memory r5, r6g In-memory DB, big data
x Extra Memory x1e, x2idn SAP HANA, large DBs
z High Frequency + Memory z1d Financial sims, EDA
d Dense Storage d2 Data warehouse
i High IOPS SSD i3, i4i NoSQL, OLTP
g GPU (Graphics/ML) g4dn, g5 ML inference, 3D
p GPU (Training) p3, p4d DL training, HPC
f FPGA f1 Hardware accel
inf Inferentia (AI infer.) inf1 AI inference
trn Trainium (AI training) trn1 AI training

Final Thoughts

AWS EC2 instance names may look confusing at first, but once you understand the family, generation, and size, it becomes easier to choose the right one. Whether you need a cheap burstable server (t2), a balanced general-purpose option (m5), a compute powerhouse (c6i), or a GPU instance (g5), AWS has a type tailored for your workload.

Thank you for reading this article all the way through.

If you found this content useful and would like to support me in creating more, you can donate. Your contribution is vital to keeping this blog running.

Donate here

Comments