skip to content

Decode the EC2 instance type name m7g.2xlarge: what does each part of the name tell you, and how many vCPUs and how much memory does that instance have?

level: juniorimportance: must knowfreq 75%

answer

  1. four parts, one dot
  2. letter, digit, letters, size
  3. the letter fixes the memory ratio
  4. g after the digit is not a GPU
  5. large is 2 vCPU, then doubling

basics

~20 s

m7g.2xlarge splits into four parts: family m (general purpose, roughly 4 GiB of memory per vCPU), generation 7, processor letter g (AWS Graviton, arm64), and size 2xlarge — 8 vCPUs and 32 GiB of memory.

solid answer

~50 s

EC2 type names are a grammar, not a list to memorise. The leading letter is the **family**, which fixes the resource ratio: `m` general purpose at about 4 GiB per vCPU, `c` compute-optimised at about 2 GiB, `r` memory-optimised at about 8 GiB, `t` burstable, `i` storage-optimised with local NVMe. The digit is the **generation** — higher means newer hardware, and usually better price-performance. Letters after the digit are capability modifiers: `g` for AWS Graviton (arm64), `a` for AMD, `i` for Intel, `d` for local NVMe instance storage, `n` for extra network bandwidth. After the dot comes the **size**, which doubles: `large` is 2 vCPUs, `xlarge` 4, `2xlarge` 8, `4xlarge` 16, and so on, with memory scaling by the family's ratio. So m7g.2xlarge is 8 vCPUs and 32 GiB on Graviton. One trap: `g` in the leading position (`g5.xlarge`) means GPU, not Graviton.

code

bash · 3 lines
bash
aws ec2 describe-instance-types \
  --instance-types m7g.2xlarge \
  --query 'InstanceTypes[0].{vCPU:VCpuInfo.DefaultVCpus,MemoryMiB:MemoryInfo.SizeInMiB,Arch:ProcessorInfo.SupportedArchitectures,Network:NetworkInfo.NetworkPerformance}'

go deeper

for a junior

Be able to read a type name aloud part by part and state the vCPU count from the size suffix. Know that large is 2 vCPUs and each step doubles.

for a middle

Explain the family ratios — roughly 2, 4 and 8 GiB per vCPU for c, m and r — and what the capability letters change about the hardware, including that g after the generation digit means arm64.

for a senior

Turn measured CPU, memory and network usage into a concrete family and size choice, and know to verify with describe-instance-types rather than trusting the name alone.

for a principal

Own the fleet-wide policy: which generations and architectures are approved, how type choices are kept portable across regions and zones, and how teams are moved onto newer generations without a per-team migration project.

## Why the name is a grammar AWS publishes hundreds of EC2 instance types, and no interviewer expects you to recite them. What they expect is that you can look at a type you have never seen and say what it is for. The name is fully systematic, so one parsing rule covers the whole catalogue. ``` m 7 g .2xlarge family generation capability size ``` ## Part 1 — the family letter fixes the ratio The leading letter tells you the vCPU-to-memory ratio and therefore which workload the type is shaped for: - `t` — burstable general purpose. A low sustained baseline with the ability to burst above it. Cheap, and the right default for dev boxes and low-traffic services. - `m` — general purpose, about **4 GiB of memory per vCPU**. The safe default when you have not measured anything. - `c` — compute optimised, about **2 GiB per vCPU**. Batch, encoding, CPU-bound API servers. - `r` — memory optimised, about **8 GiB per vCPU**. Caches, in-memory analytics, large JVM heaps. `x` and `u` families go further still. - `i` — storage optimised with large local NVMe. `d` families are dense HDD storage. - `g`, `p`, `inf`, `trn` in the **leading** position — accelerated computing: GPUs for graphics (`g`), GPUs for training/HPC (`p`), and AWS's own inference and training accelerators. The ratios are the point. If you know a service needs 32 GiB and 8 vCPUs, you already know it is an `m` shape; if it needs 64 GiB with the same 8 vCPUs, it is an `r` shape. ## Part 2 — the generation digit A higher digit is newer silicon. m5 → m6i → m7i are successive general-purpose generations. Newer generations normally deliver more performance for the same or lower on-demand price, so "move to the current generation" is one of the cheapest optimisations available. Generations are not interchangeable in every region — a new type reaches regions in waves, which is why launch failures sometimes trace back to a type simply not existing where you asked for it. ## Part 3 — capability letters after the generation These stack, in a fixed order, and each one is a real change to the hardware: - `g` — AWS Graviton, an **arm64** processor. Requires an arm64 AMI and arm64 binaries. - `a` — AMD EPYC; `i` — Intel. Both x86_64, but different silicon and price points. - `d` — includes local NVMe **instance store** volumes. - `n` — higher network and EBS bandwidth for the same vCPU count. - `e` — extra memory or storage; `z` — higher sustained clock speed. So `c7gn.4xlarge` reads as: compute optimised, 7th generation, Graviton, network enhanced, 16 vCPUs. The collision worth memorising: `g` as the **first** letter is a GPU family (`g5.2xlarge` is an NVIDIA GPU instance), while `g` **after the generation digit** is Graviton (`m7g.2xlarge`). Candidates mix these up constantly. ## Part 4 — the size suffix Sizes double along a fixed ladder: ``` large = 2 vCPU xlarge = 4 vCPU 2xlarge = 8 vCPU 4xlarge = 16 vCPU 8xlarge = 32 vCPU (and on up: 12xlarge, 16xlarge, 24xlarge, 32xlarge, 48xlarge) ``` Memory follows the family ratio, so within a family the whole machine scales linearly: m7g.large is 2 vCPU / 8 GiB, m7g.2xlarge is 8 vCPU / 32 GiB, m7g.4xlarge is 16 vCPU / 64 GiB. Below `large` you find `nano`, `micro`, `small` and `medium`, which exist mainly on burstable `t` families and a few Graviton families — not across the whole catalogue. A `.metal` suffix means no hypervisor at all: the whole physical host, used for nested virtualisation, licence-bound software, or workloads that need direct access to CPU features. ## Checking rather than guessing The grammar tells you the shape; the API tells you the truth. `aws ec2 describe-instance-types` returns exact vCPU counts, memory, supported architectures, and network performance for any type, and it is the right way to settle an argument or to build an allow-list of types for a fleet. ## What this buys you in an interview Being able to parse the name lets you answer the real question that follows — "what would you run this service on?" — out loud, in one sentence: family from the resource ratio, generation from what is current in the region, capability letters from architecture and network needs, size from measured usage plus headroom.

  • In a type name like c7gn.4xlarge, what do the letters after the generation digit mean?
    They are capability modifiers. `g` means an AWS Graviton arm64 processor and `n` means network- and EBS-bandwidth enhanced for that vCPU count. Other modifiers you will meet are `a` (AMD), `i` (Intel), `d` (local NVMe instance store), `e` (extra memory or storage) and `z` (higher clock). So c7gn.4xlarge is a compute-optimised, 7th-generation, Graviton, network-enhanced instance with 16 vCPUs.
  • If m7g.large has 2 vCPUs and 8 GiB, what do you expect from m7g.8xlarge, and what else scales with size?
    32 vCPUs and 128 GiB — the ladder doubles, and memory follows the family's 4 GiB-per-vCPU ratio. Network and EBS bandwidth scale with size too, and that matters more than people expect: smaller sizes are quoted as "up to" some figure, meaning a burst ceiling over a lower sustained baseline, while the largest size in a family gets the full non-burstable allocation.
  • Why can the same instance type fail to launch in one region and succeed in another?
    Instance types roll out region by region and Availability Zone by zone, so a current-generation type may simply not be offered where you asked. `aws ec2 describe-instance-type-offerings` tells you what exists in a given region or zone. This is why hard-coding a single type in a fleet is fragile — a list of acceptable types is more resilient.

saying these in an interview costs you the question

  • Reads the generation digit as the vCPU count
  • Thinks every 'g' in a type name means GPU
  • Assumes xlarge means the same memory in every family
  • Believes m5a and m5 are the same processor
  • Says all families offer nano through 32xlarge sizes

context