DEV Community

Cover image for AWS Part 5: EC2 Deep Dive — Instance Types, Storage & When to Use What
Unified Path Media
Unified Path Media

Posted on Originally published at unifiedpathmedia.com

AWS Part 5: EC2 Deep Dive — Instance Types, Storage & When to Use What

Originally published at unifiedpathmedia.com.

The short version: Part 3 introduced EC2 (Elastic Compute Cloud) in one sentence: virtual machines, full control over the OS (operating system). That’s accurate, and also not nearly enough to actually pick one. This is the part where “which instance type?” and “which storage?” stop being guesses. Instance types are grouped by what they’re good at (general purpose, compute-heavy, memory-heavy) not by size alone, and the storage you attach is a separate decision from the instance itself.

← Part of the AWS Foundations series

Published September 24, 2026.

Last verified November 5, 2026 against the EC2 instance type documentation from AWS (Amazon Web Services). AWS adds new generations every year, so the newest names may have moved on by the time you read this.

Who this is for: anyone about to launch their first EC2 instance and wondering why there are hundreds to choose from. You’ll need first: a rough idea of what EC2 is (AWS Part 3 covers it in a paragraph).

EC2 is the service every AWS beginner reaches for first, and the one most tutorials rush past fastest. Picking t3.micro because it showed up in a free-tier guide works for a demo. It stops working the moment the workload is real.

Diagram of EC2 instance families T, M, C and R by their CPU-to-memory balance, next to storage options: instance store inside the physical host that is wiped on stop, and a network-attached EBS volume that survives stop, with gp3 as the default and io2 for guaranteed IOPS

Pick the family by the job, then the size. Storage is its own decision.

The EC2 instance families at a glance

AWS groups every instance type into six categories. The first letter of the name tells you which one you’re looking at.

Category Letters you’ll see Good for Starting out?
General purpose T, M Web apps, dev environments, most things Start here
Compute optimized C CPU-heavy work: encoding, batch jobs, busy APIs Once CPU is the bottleneck
Memory optimized R, X Caches, large databases, in-memory analytics Once memory is the bottleneck
Storage optimized I, D Very fast or very large local disk Rarely
Accelerated computing G, P and others GPUs and other special chips for machine learning and graphics Rarely
High-performance computing Hpc Large scientific and engineering simulations Almost never

Instance families: grouped by job, not just by size

AWS names instance types like t3.micro or m7i.large for a reason: the letter tells you the family, the number is the generation, and the size is just how much of that family you get. The families that actually matter starting out:

  • T-family (t3, t4g): burstable general purpose. Cheap, and fine for workloads that are idle most of the time with occasional spikes (a low-traffic web app, a dev environment). The catch: sustained high CPU (processor) use burns “credits,” (a running allowance of extra CPU that refills while the instance is quiet) and running one flat-out for long either slows it down (standard mode) or, in unlimited mode (the default for t3 and t4g), adds a charge if its average CPU over 24 hours stays above the baseline.
  • M-family (m7i, m8i, m8g): general purpose, no burst mechanic. The default choice once a workload needs steady, predictable performance instead of occasional bursts.
  • C-family (c7i, c8i, c8g): compute-optimized. More CPU per dollar, less memory. Right for CPU-bound work: video encoding, batch processing, high-traffic APIs doing real computation.
  • R-family (r7i, r8i, r8g): memory-optimized. More RAM (memory) per dollar, less CPU. Right for in-memory caches, large databases, and anything that’s memory-bound rather than CPU-bound.

You’ll also see -flex versions, such as m7i-flex. They cost a little less than the standard version and suit workloads that don’t need full CPU all the time. Two of them, c7i-flex.large and m7i-flex.large, are on AWS’s Free Tier list for new accounts; the Free Tier post has the full list.

The rule of thumb: start with a T-family instance for anything low-traffic or still being built, and only move to M, C, or R once you know which resource your workload is actually bottlenecked on. Guessing bigger “just in case” mostly just guesses at a bigger bill.

Storage: a separate decision from the instance itself

Unlike a physical server, EC2’s compute and its storage aren’t the same purchase: the instance type picks your CPU and RAM; the storage attached to it is chosen separately, and getting it wrong is a different, and more common, mistake than picking the wrong instance size.

  • EBS (Elastic Block Store): a network-attached virtual hard drive. This is the default for almost everything: it persists independently of the instance, so stopping or even terminating the instance doesn’t have to mean losing the data. (The root volume is deleted on termination by default, so check that setting for anything you want to keep.)
  • Instance store: physically attached to the host hardware. Faster, but temporary: the data is gone the moment the instance stops. Only right for data you can afford to lose: a cache, scratch space, temp files being reprocessed anyway.

Within EBS itself, the volume type matters too: gp3 is the general-purpose default for most workloads, while io2 exists for databases that need guaranteed, consistent high IOPS (input/output operations per second: how many reads and writes the disk can handle each second). Start with gp3 unless you have a specific, measured reason not to.

Get the free cloud lessons: a short, plain-English lesson every week. Subscribe free

Trying this without spending anything

Every concept above (instance types, EBS volumes, the tradeoffs between them) can be created and torn down for free in MiniStack before any of it touches a real AWS bill.

bash

$ export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=us-east-1
$ aws ec2 run-instances \
    --image-id ami-0abcdef1234567890 \
    --instance-type t3.micro \
    --endpoint-url http://localhost:4566
Enter fullscreen mode Exit fullscreen mode

Reading an instance name

Names like m7i.large look like license plates, but they follow a pattern:

  • m is the family (general purpose).
  • 7 is the generation. Newer generations are usually faster and cheaper for the same size.
  • large is the size. Sizes double as you go up: large, xlarge, 2xlarge and so on.

Extra letters after the generation add details: g means AWS’s own Graviton processors, i means Intel, a means AMD, d means it comes with instance store (local disk on the host), and n means extra network bandwidth. Don’t mix up a lowercase i after the number (the Intel in m7i) with a capital I at the start (the I family, which is storage optimized). A size of metal means you get the whole physical server, with no virtual machine layer in between. Once you can read these, the instance list stops looking like noise.

Graviton (the g types) usually costs less for the same size, but your software has to run on Arm processors. Most Linux software and common languages do; check older or Windows-only software first.

Three ways to pay

  • On-demand: pay by the second or hour, no commitment. Right for learning and anything unpredictable.
  • Savings plans or reservations: commit to steady usage for a lower rate. Right once you know a workload will run for a year or more.
  • Spot: spare capacity at a steep discount that AWS can take back with two minutes’ notice. Right for work that can be interrupted, like batch jobs.

To see the monthly price before you launch anything, see FinOps Part 2.

Right-sizing

Most new instances are too big because nobody wants to be the person who picked too small. Start modest, watch CPU and memory for a week or two, and move up or down based on what you see. Resizing an instance is a few clicks (stop it first; it comes back at the new size). Guessing high and forgetting about it is how bills grow quietly. Two catches: the public IP (internet protocol) address changes when the instance stops (unless you’ve attached an Elastic IP, a fixed address you reserve), and you can’t switch between Intel or AMD and Graviton this way, because the operating system image is built for one kind of processor.

Common mistakes

  • Leaving instances running. A stopped instance doesn’t charge for compute, but its disks still do. FinOps Part 3 covers the other things that bill quietly.
  • Orphaned volumes. Check whether storage deletes with the instance. If not, it’s still there afterwards, still billing.
  • Using the biggest family “just in case.” Match the family to the job, as in the families section above.
  • Skipping tags. Without them, you can’t tell later which instance belongs to which project. FinOps Part 4 shows a simple labelling scheme.

EC2 instance types: quick answers

What are the EC2 instance families?

AWS sorts instance types into six categories: general purpose (T, M), compute optimized (C), memory optimized (R, X), storage optimized (I, D), accelerated computing (G, P and others) and high-performance computing (Hpc). The first letter of an instance name tells you which one you have.

What does t3.micro mean?

t is the family (burstable general purpose), 3 is the generation and micro is the size. Sizes go up from nano and micro through small, medium and large to xlarge, 2xlarge and beyond, roughly doubling at each step from large upward.

Which EC2 instance type should a beginner pick?

A T-family instance such as t3.micro or t4g.micro. They’re cheap, they’re on the Free Tier list for new accounts, and they’re fine for learning and low-traffic apps. Move to M, C or R only once you can see which resource is running out.

Can I change the instance type later?

Yes. Stop the instance, change the type, and start it again; the whole thing usually takes a few minutes. Your EBS data stays put. Expect a new public IP address unless you use an Elastic IP, and note that moving between Intel or AMD and Graviton means launching a new instance instead.

Which EC2 instances are free?

For accounts opened on or after July 15, 2025, AWS lists t3.micro, t3.small, t4g.micro, t4g.small, c7i-flex.large and m7i-flex.large as Free Tier eligible, paid for from your credits. The Free Tier post explains how the credits work.

What’s the difference between EBS and instance store?

EBS is a network drive that keeps your data when the instance stops. Instance store is a disk on the host itself: faster, but the data is gone when the instance stops. Use EBS unless you’re storing something you can afford to lose.

Should I use Graviton or Intel?

Graviton (types with a g) usually gives more performance per dollar if your software runs on Arm. If you’re not sure it does, Intel or AMD types are the safe default.

Next: Part 6: RDS vs. DynamoDB — Choosing Your Database →

← Back to the AWS Foundations series


Thanks for reading. I write a free, plain-English cloud lesson every week: subscribe to the newsletter. The full AWS Foundations series and free cloud tools live at unifiedpathmedia.com.

Top comments (0)