Instance Types and CPU Credits
Inkwell is about to launch its first EC2 server and meets a drop-down with hundreds of options: t3.micro, m7g.large, c7i.2xlarge, r6i.xlarge. Picking at random either wastes money or starves the shop of power. The names look like noise, but every one follows the same pattern.
The rule
Read the name left to right: family, generation, options, size.
Take m7g.large:
m, the family: what the machine is balanced for.tis burstable general purpose,mis balanced general purpose,cis compute-optimised (more CPU per GB of memory),ris memory-optimised,iis storage-optimised, and families such asgandpcarry GPUs.7, the generation: higher is newer, and usually better value.g, the options: extra letters describe the processor or features. Heregmeans AWS's own Graviton (Arm) chip;imeans Intel,ameans AMD, anddadds fast local disks.large, the size: sizes step upmicro,small,medium,large,xlarge,2xlargeand beyond, and fromlargeupwards each step roughly doubles CPU and memory. Anm7g.largehas 2 vCPUs and 8 GiB; anm7g.xlargehas 4 vCPUs and 16 GiB.
The T family has a twist: CPU credits. A T instance has a baseline, a share of CPU it can use all the time. Below the baseline it earns credits; above it, it spends them. One credit is one vCPU at 100% for one minute. A t3.micro has 2 vCPUs, a baseline of 10% each, and earns 12 credits per hour.
When credits run out, standard mode throttles the instance back to its baseline. Unlimited mode, the default for T3 and T4g, keeps bursting but bills you for the extra.