A guided path · 8 modules · ~15 minutes

Pick the right EC2 instance. Know the bill before you launch.

Start at zero and finish able to read an instance name like m7g.large, explain when a cheap burstable box quietly becomes the expensive one, and estimate your own monthly cost. Nothing to sign up for.

Module 1 of 8

What even is an EC2 instance?

It's renting a computer by the hour instead of buying one. That's genuinely most of it.

When you launch an EC2 instance, AWS carves a slice out of a physical server sitting in one of their data centres and hands it to you. You choose how much CPU, RAM, storage and network capacity that slice has. You pay for every hour (usually every second) it's switched on, and nothing once you shut it down.

Instance — in other words: a virtual server — a computer you control, running on hardware someone else owns.

vCPU — in other words: one virtual processor core; two vCPUs can do roughly twice as much work at once as one.

You rent compute. AWS owns and maintains the metal.

Module 2 of 8

Decoding the name

Every instance name follows one pattern: [Family][Generation][Attributes].[Size]. Once you can read it, the catalogue stops being intimidating.

[Family][Generation][Attributes].[Size]  →  m7g.large
  • Family — the category: general purpose, compute, memory, storage, GPU.
  • Generation — the hardware version. Higher is newer, faster and usually more efficient per dollar.
  • Attributesg Graviton/ARM, i Intel, a AMD, d local NVMe disk attached.
  • Size.large.xlarge .2xlarge. Each step roughly doubles vCPU, RAM and price.

Click any name below to break it apart.

t4g.large

  • Family

    t

    T — burstable. Cheap when mostly idle, bursts using CPU credits.

  • Generation

    4

    4th generation hardware.

  • Attribute

    g

    g — AWS Graviton (ARM) processor.

  • Size

    large

    large — 2 vCPU / 8 GiB RAM (the baseline step).

A 4th-gen burstable instance on AWS's own ARM chip. The classic cheap dev/low-traffic box.

Module 3 of 8

Meet the families

The first letter tells you what the machine is shaped for. Get this right and everything else is fine-tuning.

T

Turbo / burstable

Bursts above a CPU baseline using earned "credits"; cheapest idle-heavy option.

Best for
Dev/test boxes, low-traffic web apps, small databases with occasional spikes.
Avoid for
Sustained high-CPU work (video encoding, CI runners, always-busy databases).
M

Main / multipurpose

Balanced CPU:RAM (roughly 1:4), fixed performance, no credit system.

Best for
General web/app servers, steady-traffic backends.
Avoid for
Workloads needing lots of RAM per core, or GPU.
C

Compute optimized

More CPU per GB of RAM.

Best for
Batch processing, gaming servers, heavy math, video transcoding.
Avoid for
Memory-hungry databases.
R

RAM optimized

Roughly 1:8 vCPU:RAM ratio.

Best for
In-memory caches (Redis), medium-large databases, analytics.
Avoid for
Light, bursty workloads (you'd overpay for unused RAM).
X / Z

Extreme memory

Very high RAM per core.

Best for
Massive enterprise databases (e.g., SAP HANA).
Avoid for
Small projects — heavily overpowered and priced accordingly.
I / D

I/O / Dense storage

Fast local NVMe disks attached directly to the instance.

Best for
Data warehousing, search indexes, workloads needing constant local disk I/O.
Avoid for
Anything using network-attached storage (EBS) exclusively.
P / G / F

Performance / Graphics / FPGA

GPU or custom accelerator hardware.

Best for
AI/ML training and inference, 3D rendering, video processing at scale.
Avoid for
Anything without a genuine GPU need — these are the most expensive tier.
Mac

macOS

Real Apple hardware in an AWS data center.

Best for
Building/testing iOS and macOS apps.
Avoid for
Literally anything else.

Module 4 of 8

Burstable vs. fixed: the CPU credit system

This is the one beginners get wrong. T-series instances are cheap right up until they aren't — and the switch happens quietly.

A T-series instance has a CPU baseline — 30% for a t4g.large. Run below it and you bank credits. Run above it and you spend them. A t4g.large earns 36 credits/hour (864/day), and one credit buys one vCPU-minute at 100%.

CPU baseline — in other words: the amount of processor you've actually paid for; anything above it is borrowed against your credit balance.

Standard mode

When the credits run out, the instance is throttled back to baseline. No surprise charges — just slower performance until credits rebuild.

Unlimited mode

The instance keeps running at full speed past the credit limit, billed at a surplus rate of $0.04 per extra vCPU-hour. No throttling — but sustained use gets expensive fast.

Cost comparison at sustained 100% CPU: t4g.large in Unlimited mode versus a fixed m7g.large
t4g.large (Unlimited, 100% CPU)m7g.large (fixed)
Base rate$0.0672/hr$0.0816/hr
Surplus at 100% CPU+$0.056/hr (1.4 vCPU-hrs deficit × $0.04)$0.00
Total at sustained 100% CPU$0.1232/hr (~$89.94/mo)$0.0816/hr (~$59.57/mo)

Prices shown are illustrative examples as of 2026 and change over time — check the AWS Pricing Calculator for current rates.

Pick a workload to watch the credit tank fill or drain.

Credit balance

100%

Avg CPU

8%

baseline 30%

No surplus charges

Idles most of the day, occasional spikes when you deploy or run a test.

Well under the 30% baseline. The credit tank stays full (capped), spikes are paid for out of earned credits, and you never see a surplus charge. t4g.large at $0.0672/hr — about $49/mo.

Takeaway

Below roughly 30% average utilization, T-series is the cheapest option available. Above it, the "cheap" burstable instance quietly becomes the expensive one.

Module 5 of 8

Understanding the bill

Four ways to pay for the exact same machine. The difference between them is how much flexibility you're willing to trade for a discount.

On-Demand

Pay as you go.

Billed per hour (per second for most Linux instances), no commitment, cancel whenever. It is the most expensive per-hour rate — you are paying for total flexibility.

Reserved Instances

Commit to a machine, get a discount.

You commit to a specific instance type in a specific region for 1 or 3 years. Discounts reach roughly 60% on a 3-year, all-upfront commitment.

Savings Plans

Commit to a spend, not a machine.

You promise a dollars-per-hour spend instead of a specific instance type. More flexible than Reserved if your instance size might change as you grow.

Spot Instances

Cheap leftovers, can be taken back.

You bid on AWS's spare capacity for steep discounts, but AWS can reclaim the instance with short notice. Only for work that can be interrupted and restarted safely.

The 730-hour rule

An average month has about 730 hours. That's the only arithmetic you need:

$0.0672/hr × 730 = ~$49/mo

$0.0816/hr × 730 = ~$59.57/mo

Wherever you see an hourly rate on this site, the monthly figure sits next to it — get in the habit of reading both.

Takeaway

If an instance will run more than roughly 40–50% of the year, even the cheapest Reserved or Savings commitment beats On-Demand.

Prices shown are illustrative examples as of 2026 and change over time — check the AWS Pricing Calculator for current rates.

Module 6 of 8

ARM (Graviton) vs. x86 (Intel/AMD)

AWS designs its own ARM-based chip, Graviton. It's typically 15–40% cheaper per unit of compute than the equivalent Intel or AMD instance.

The g in t4g.large or m7g.large means Graviton. Same instance shape, lower price. There is exactly one real catch: your Docker images and dependencies need linux/arm64 builds. Most mainstream stacks — Postgres, Redis, RabbitMQ, Node, Python, Go, Java — ship ARM64 images out of the box. Some older or specialized packages don't.

linux/arm64 — in other words: a version of a program compiled for ARM chips; x86 builds simply won't run on Graviton.

Choose Graviton if

You're comfortable checking your Docker images for ARM64 support. You get the same performance for less money.

Choose x86 if

You want zero compatibility thinking. A small premium buys universal compatibility with anything you might install.

Module 7 of 8

Managed vs. self-hosted: where should your database live?

You can run Postgres or Redis in a container on the EC2 instance you already pay for, or pay AWS to run it for you via RDS, ElastiCache or Amazon MQ.

Self-hosting typically cuts database costs 40–70% versus the fully managed equivalent. In exchange you take on your own backups, patching and failover — the unglamorous work the managed service was doing quietly in the background.

Failover — in other words: automatically switching to a standby copy of the database when the main one dies.

Self-host if

  • You're early-stage, one person or a small team
  • You're comfortable with Docker and basic backup scripts
  • Cost matters more than zero-touch reliability

Use managed (RDS/etc.) if

  • You need automatic failover / Multi-AZ
  • You don't want to own a backup strategy
  • The cost of downtime is high

Module 8 of 8

Real-world scenarios

Four situations you're likely to actually be in. Flip between them and see the reasoning, not just the answer.

The situation

You're one person running a Dockerized FastAPI backend with Postgres on the same box. A handful of requests per minute.

Why

Average CPU sits far below the 30% baseline, so credits keep accumulating and your spikes are free. Graviton keeps the base rate low, and both FastAPI and Postgres have first-class ARM64 images.

Recommended

t4g.large

Estimated cost

~$49/mo

Prices shown are illustrative examples as of 2026 and change over time — check the AWS Pricing Calculator for current rates.

That's the whole path.

The cheat sheet consolidates the family table, the naming decoder, the credit formula and the pricing models onto one page. That's the one to bookmark.

Open the cheat sheet