EC2 Instance Families and Purchase Options

Topics Covered

Reading an Instance Type

The grammar of a name

Sizes double

What a vCPU is

The Nitro system

Generations matter

Quotas are counted in vCPUs

Finding the right type quickly

Operating systems and licensing

Dedicated options

Reading the catalogue over time

EC2 offers several hundred instance types, and the list grows every few months. That looks overwhelming until you notice that every name is a compact description of the hardware, written in a consistent grammar. Once you can read the grammar, choosing an instance becomes a matter of matching the shape of a workload to the shape of a machine, and pricing becomes a matter of deciding how much of that machine you are willing to commit to in advance. This lesson covers both halves: what the machines are, and how to pay for them without wasting money or capacity.

The grammar of a name

Take m7g.2xlarge. The first letter, m, is the family, which describes the balance between processor and memory. The number, 7, is the generation, and higher generations are almost always better value than lower ones at the same size. The letters after the number are attributes: g means an AWS Graviton processor, i means Intel, a means AMD. Further attribute letters add capabilities: d means local NVMe instance storage, n means enhanced networking bandwidth, e means extra memory or storage, z means high single thread frequency, and flex marks a lower cost variant that can deliver its full performance most of the time but not all of the time. After the dot comes the size, from medium and large up through xlarge, 2xlarge and so on to 48xlarge, plus metal for the whole physical host with no hypervisor.

So r7iz.4xlarge is a memory optimised, seventh generation, Intel, high frequency instance with sixteen vCPUs, and c7gd.8xlarge is a compute optimised, seventh generation, Graviton instance with local NVMe storage and thirty two vCPUs. Each name is a specification sheet in a dozen characters.

Family, generation, attributes, size. Each step up in size doubles the vCPUs, memory and usually the network and EBS bandwidth.

Sizes double

Within a family, each size step doubles the resources. A large has two vCPUs, an xlarge four, a 2xlarge eight, a 4xlarge sixteen. Memory doubles in step, and so does the hourly price, so the price per vCPU is constant within a family and generation. Network and EBS bandwidth usually scale too, but not linearly at the small end, which is one of the more important details in this lesson and gets its own section below. The largest sizes and metal give you the whole host, which matters for licensing that counts physical cores, for workloads that need hardware performance counters, and for nested virtualisation.

What a vCPU is

A vCPU is not the same thing on every processor. On Intel and AMD instances, a vCPU is one hardware thread, and two threads share one physical core. On Graviton, a vCPU is a full physical core, because Graviton does not use simultaneous multithreading. That changes the arithmetic for CPU bound work. A compute heavy service that saturates both threads of a core gets perhaps a fifth to a third more throughput from the second thread, not double, so four Intel vCPUs are roughly two cores and some extra, while four Graviton vCPUs are four cores. Benchmarks comparing instance types at equal vCPU counts are therefore comparing different amounts of silicon, and the only comparison that matters is measured throughput per dollar on your own workload.

The Nitro system

Every current generation instance runs on the Nitro system, which moved networking, storage and management off the host processor onto dedicated cards and replaced the old hypervisor with a minimal one. The practical consequences are that almost all of the host's processor and memory are available to your instance, that network and EBS performance are consistent, that EBS volumes appear as NVMe devices, and that bare metal instances are possible. Older Xen based instances still exist in older families, and they show up in surprising places, such as long running instances nobody has touched in years. Moving those to a current generation is usually the cheapest performance improvement available in an account.

Generations matter

A new generation typically offers better price performance than the one before it, often by ten to twenty five percent for the same size and similar hourly price. Old generations are not discounted to compensate, and in some cases they cost more per hour than their replacements. They also tend to have lower network and EBS bandwidth at each size. An inventory that shows a large share of fifth generation or older instances is an inventory with an easy saving in it, usually limited only by the testing needed to move an AMI or a kernel to the newer platform.

Quotas are counted in vCPUs

On Demand instance limits are expressed in vCPUs per region, grouped by family: one quota for the standard families together, A, C, D, H, I, M, R, T and Z, and separate quotas for GPU families, high memory, FPGA and others. A new account's limits are modest, and a launch that exceeds them fails with VcpuLimitExceeded. Spot has its own vCPU quotas. These limits matter in exactly the moments you least want them to, during a scaling event or a regional failover that suddenly needs twice the usual capacity, so raising them well in advance is part of capacity planning, a theme the quotas lesson later in the course develops in detail.

Finding the right type quickly

Two tools make the catalogue manageable. The aws ec2 describe-instance-types call, with filters on vCPU, memory, processor architecture and network performance, returns every type in a region that matches, which is far faster than reading documentation pages. And attribute based instance type selection in Auto Scaling groups and EC2 Fleet lets you describe what you need, such as four to eight vCPUs, at least sixteen gibibytes of memory and a current generation, rather than naming types, so that new generations are picked up automatically when they launch. Both shift the question from which instance to which shape, which is the right question.

Operating systems and licensing

The hourly price on the pricing page assumes Linux. Windows instances include the Windows Server licence and cost noticeably more per hour, and some commercial Linux distributions and SQL Server editions add their own licence charges. Licences that count physical cores or sockets, as several database and middleware products do, interact with instance choice in ways that can dominate the infrastructure cost. A high frequency instance with fewer, faster cores, or a dedicated host where you can bring your own licences, can be much cheaper overall than a larger general purpose instance, even though its hourly price is higher. When licences are involved, the price per vCPU is the wrong number to compare; the price per licensed unit of work is the right one.

Dedicated options

Instances normally share physical hosts with other customers, isolated by Nitro. Dedicated Instances run on hardware dedicated to your account, and Dedicated Hosts give you a whole physical server with visibility into its sockets and cores, which is what bring your own licence arrangements usually require. Both cost more and reduce placement flexibility. They exist for licensing and compliance requirements, not for performance, since Nitro already isolates tenants at the hardware level and a shared instance performs the same as a dedicated one of the same type.

Reading the catalogue over time

AWS adds new generations steadily, and each launch typically starts in a few large regions before spreading. A team that hard codes instance types in launch templates and infrastructure code will lag behind by years unless someone revisits them. A quarterly check of the newest generation available in each region the organisation uses, compared against what is running, keeps the fleet current with little effort, and attribute based selection removes most of that work for Auto Scaling groups.

Reading names fluently also speeds up reviews: a pull request that changes m5.xlarge to r7g.xlarge is changing processor architecture, generation and memory ratio at once, and deserves the questions each of those implies.

The name is the specification

Every instance type name reads as family, generation, attributes and size. m7g.2xlarge is a general purpose, seventh generation, Graviton machine with eight vCPUs. Sizes double resources and price, so price per vCPU is constant within a family, and a Graviton vCPU is a whole core while an Intel or AMD vCPU is one thread.