Making sense of EC2 instance names

How I remember what the letters mean and work out vCPUs and memory without opening another tab.

AWS instance names have a way of looking familiar long before they become particularly informative. You can spend quite a while looking at m6a.2xlarge in a console or a Terraform file, recognise it as a perfectly reasonable thing to run a service on, and still need another tab to remember how much CPU and memory you have actually asked for.

I wanted a way to read these names and immediately picture the machine, without trying to memorise the entire EC2 catalogue, which seems like a fairly unreasonable use of anybody’s brain. The shortcut I find useful is that, for the ordinary C, M, and R instances, the size gives you the vCPU count and the family gives you the memory per vCPU.

Remember that an xlarge has 4 vCPUs, and C, M, R usually give you 2, 4, 8 GiB per vCPU. There are exceptions, because apparently we cannot have nice things without a footnote, but that gets you surprisingly far.

The name is doing several jobs

Take m6a.2xlarge, which becomes much less mysterious once you split it into its parts:

PartWhat it tells you
mGeneral-purpose series
6Sixth generation within that series
aAMD processor option
2xlargeInstance size, twice an xlarge

The generation number belongs to the EC2 family; it is neither the number of cores nor the processor manufacturer’s generation number. In the processor suffix, a means AMD, i means Intel, and g means AWS Graviton, which is Arm-based. Position matters: the g in m7g describes the processor, whereas a name beginning with g belongs to the graphics-intensive series. AWS keeps the full mapping in its instance naming reference.

For the capacity calculation on this particular instance, you can set 6a aside for a moment and concentrate on m and 2xlarge.

The bit worth remembering

I remember the three families as compute, mixed, and RAM, with “mixed” simply being a convenient way to remember that M is the balanced, general-purpose option. These are memory aids, rather than a claim that AWS officially expands every letter that way.

FamilyMemory aidUsual memory per vCPU
CCompute2 GiB
MMixed4 GiB
RRAM8 GiB

For standard variants following this pattern, the size ladder looks like this. Memory values are in GiB throughout; a GiB is 1,024 MiB.

SizevCPUsC memoryM memoryR memory
medium1248
large24816
xlarge481632
2xlarge8163264
4xlarge163264128
8xlarge3264128256

Not every family offers every size, particularly medium, so this is a way to understand a size that exists, rather than a promise that AWS sells every combination. The underlying specifications are in AWS’s compute, general-purpose, and memory-optimised tables.

For m6a.2xlarge, two times four gives us 8 vCPUs, and M’s four GiB per vCPU gives us 32 GiB of memory. For r7g.4xlarge, four times four gives us 16 vCPUs, and R’s eight GiB per vCPU gives us 128 GiB. Once you have done that a couple of times, the names start carrying rather more information than “one of the bigger ones”.

It also makes comparisons easier to think through. At the same xlarge size, a standard C instance gives you 4 vCPUs and 8 GiB, M gives you 4 and 16, and R gives you 4 and 32, so moving between those families changes the memory budget without necessarily changing the vCPU count. That is a useful starting point when a service needs more memory but you are not trying to give it more CPU.

T instances have their own little arrangement

The place where this shortcut is most likely to trip somebody up is a small T instance, because medium does not mean the same vCPU count as it did in the table above. For T3, T3a, and T4g, memory doubles at each step while the vCPU count stays at two all the way from nano through large.

SizevCPUsMemory (GiB)
nano20.5
micro21
small22
medium24
large28
xlarge416
2xlarge832

These counts are listed on the T3/T3a and T4g pages. Keep the scope of that table in mind: it is not a table for every historical T generation.

I think of T as “temporary turbo”, because the important distinction is its burstable CPU model. A T instance has a baseline level of CPU performance and uses credits to go above it, so seeing two vCPUs does not mean you should budget for two vCPUs running flat out indefinitely at the base price. In Standard mode, exhausting the accumulated credits brings performance back towards the baseline; Unlimited mode allows continued bursting using surplus credits, which can incur additional charges. AWS explains the accounting in its CPU credit guide.

That is why a t3a.xlarge and an m6a.xlarge can both say 4 vCPUs and 16 GiB while still being quite different choices for a sustained workload. The capacity numbers are only part of what you are buying.

Please do not quietly turn vCPUs into cores

There is another small distinction that becomes rather less small when you are comparing machines: everything we have calculated so far is a vCPU count, and a vCPU is not always a physical core.

With simultaneous multithreading, a core exposes multiple hardware threads, each of which can appear as a vCPU. An m6i.2xlarge, for example, has 8 vCPUs across 4 physical cores by default, whereas an r7g.4xlarge has 16 vCPUs across 16 Graviton cores. You cannot safely turn this into “divide by two for x86”, either: m7a.2xlarge has 8 vCPUs across 8 cores. The general-purpose and memory-optimised specifications list the topology explicitly.

AWS also lets you change core counts or threads per core on supported types through CPU options, which means the name describes the default configuration rather than necessarily telling you what a particular running machine exposes. Equal vCPU counts are useful for orientation, but they are not a benchmark.

The extra letters deserve a look

Once you start meeting longer names, it helps to recognise a few more suffixes: d indicates instance-store volumes, n indicates network and EBS optimisation, and z indicates high CPU frequency. The meaning of e depends on the family, so it is a particularly good reason to check the naming reference rather than inventing an expansion that happens to sound plausible.

Some variants also break the memory arithmetic. A c5n.xlarge has 4 vCPUs but 10.5 GiB, rather than the 8 GiB our C shortcut would predict, as the C5n specifications show. GPU instances, high-memory machines, and bare-metal sizes deserve their own lookup too; I would rather remember a small rule with a clear boundary than keep stretching it until it becomes wrong.

When I do open another tab

For comparing instances, I actually quite like Vantage’s instance comparison site, which lets me put the options next to each other instead of bouncing between AWS pages and trying to remember what the previous one said. I’ve found their information pretty up to date, and it is especially handy for the GPU families, whose nomenclature I don’t normally touch and have made absolutely no attempt to memorise.

Apparently the recommended way to look these up is through the AWS CLI, although I never actually use it for this. Feel free to do so :)

aws ec2 describe-instance-types \
  --region ap-south-1 \
  --instance-types m6a.2xlarge r7g.4xlarge t3a.medium \
  --query 'InstanceTypes[].{Type:InstanceType,vCPUs:VCpuInfo.DefaultVCpus,Cores:VCpuInfo.DefaultCores,ThreadsPerCore:VCpuInfo.DefaultThreadsPerCore,MemoryMiB:MemoryInfo.SizeInMiB,Architecture:ProcessorInfo.SupportedArchitectures[0]}' \
  --output table

The point of remembering this is to make an instance name useful when it appears in a conversation, a dashboard, or a pull request, so you can spend your attention on whether the machine suits the workload. For the common cases, “xlarge is four, C/M/R is two/four/eight” gets me there quickly enough, and leaves a little more room in my head for whatever the service running on it has decided to do today.