The one page to bookmark

EC2 cheat sheet

Everything from the eight modules, condensed. Print it, bookmark it, or check it right before you click Launch Instance.

1. The naming pattern

[Family][Generation][Attributes].[Size]

m7g.large → M, 7th gen, Graviton, 2 vCPU / 8 GiB

  • Family — the category (t, m, c, r, i…).
  • Generation — hardware version; higher = newer, faster, more efficient.
  • Attributes — g = Graviton/ARM, i = Intel, a = AMD, d = local NVMe disk.
  • Size — .large → .xlarge → .2xlarge; each step roughly doubles vCPU, RAM and price.

2. The families

LetterStands forWhat it doesBest forAvoid for
TTurbo / burstableBursts above a CPU baseline using earned "credits"; cheapest idle-heavy option.Dev/test boxes, low-traffic web apps, small databases with occasional spikes.Sustained high-CPU work (video encoding, CI runners, always-busy databases).
MMain / multipurposeBalanced CPU:RAM (roughly 1:4), fixed performance, no credit system.General web/app servers, steady-traffic backends.Workloads needing lots of RAM per core, or GPU.
CCompute optimizedMore CPU per GB of RAM.Batch processing, gaming servers, heavy math, video transcoding.Memory-hungry databases.
RRAM optimizedRoughly 1:8 vCPU:RAM ratio.In-memory caches (Redis), medium-large databases, analytics.Light, bursty workloads (you'd overpay for unused RAM).
X / ZExtreme memoryVery high RAM per core.Massive enterprise databases (e.g., SAP HANA).Small projects — heavily overpowered and priced accordingly.
I / DI/O / Dense storageFast local NVMe disks attached directly to the instance.Data warehousing, search indexes, workloads needing constant local disk I/O.Anything using network-attached storage (EBS) exclusively.
P / G / FPerformance / Graphics / FPGAGPU or custom accelerator hardware.AI/ML training and inference, 3D rendering, video processing at scale.Anything without a genuine GPU need — these are the most expensive tier.
MacmacOSReal Apple hardware in an AWS data center.Building/testing iOS and macOS apps.Literally anything else.

3. The credit formula

  • 1 credit = 1 vCPU-minute at 100%.
  • t4g.large baseline = 30% CPU; earns 36 credits/hour (864/day).
  • Above baseline → drains credits. Below baseline → banks them.
  • Standard mode: credits gone → throttled to baseline, no extra charge.
  • Unlimited mode: full speed continues, billed $0.04 per extra vCPU-hour.

Sustained 100% CPU

t4g.largem7g.large
Base$0.0672/hr$0.0816/hr
Surplus+$0.056/hr$0.00
Total$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.

4. Pricing models

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: hourly rate × 730 = monthly on-demand cost. $0.0672/hr × 730 = ~$49/mo.

Break-even: if an instance runs more than roughly 40–50% of the year, even the cheapest Reserved or Savings commitment beats On-Demand.

Graviton: typically 15–40% cheaper per unit of compute — as long as your images are linux/arm64.

Self-hosting a database on EC2 usually cuts costs 40–70% vs. RDS/ElastiCache — you take on backups, patching and failover.

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