Stop 05 · Compute With Amazon EC2Topics · 3/9

EC2 Instance Types & Families

Part of the AWS Roadmap

In short

AWS alone has hundreds of instance types. Pick too small and your app crawls. Pick too big and you're burning money every hour. The names look scary but follow a simple pattern.

Instance types are grouped into families for different needs: general purpose (such as t and m), compute optimised (c), memory optimised (r), storage optimised (i) and accelerated computing with GPUs (such as g and p). The size, like large or xlarge, sets vCPU and memory.

The blob character thinks while standing beside an auto-rickshaw, a minibus and a small truck.

Think of it like this

Auto, minibus or tempo

Two friends to the station? Take an auto. A cricket team to a match? Book a minibus. Shifting a fridge? Call a tempo. Nobody books a truck for two people. Instance types are vehicles for different loads.

Watch it happen

Decoding an instance name

m
0
7
1
i
2
large
3

1/6AWS names look random but read left to right: family, generation, extras, size.

The big ideas

What you need to know

General purpose first

Web apps and APIs usually start on general purpose (m or t). Switch only when metrics show a clear bottleneck.

Compute vs memory

Video encoding or batch maths? Compute-optimised. Big caches or in-memory databases? Memory-optimised.

Burstable t types

t instances earn CPU credits while idle and spend them in bursts. Great for low, spiky use; poor for constant heavy load.

Size from data

Watch CPU and memory for a week. If CPU never passes 20%, go a size down. That's right-sizing.

See it in code

A tiny example

bash
1aws ec2 describe-instance-types \2  --instance-types t3.micro m7i.large c7i.large r7i.large \3  --query "InstanceTypes[].[InstanceType,VCpuInfo.DefaultVCpus,MemoryInfo.SizeInMiB]" \4  --output table

Compare vCPUs and memory side by side. Notice r7i.large has the same vCPUs as c7i.large but four times the memory.

Save yourself the pain

Common mistakes

Oops

Picking the biggest instance 'to be safe'.

Do this instead

Start modest, watch real metrics, then resize. Changing instance type takes a stop and start, not a rebuild.

Oops

Running a busy production database on a tiny burstable instance.

Do this instead

Once CPU credits run out, a t instance slows right down. Use t for light or spiky work only.

Your mission

Match the workload

~20 min

Quick check

Your app's CPU sits at 15% but memory is always above 90%. What change makes sense?

Go deeper

  1. 1Decode an instance name like m7g.large into family, generation, processor option and size.
  2. 2Learn how burstable t-family instances use CPU credits.
  3. 3Pick a suitable family for a web server, an in-memory cache and an ML training job.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge