The type is the instance's size. Its name has a family, a generation and a size:
Families
| Family | Built for | Example |
|---|---|---|
t | small, cheap, mostly idle work, with short bursts | t3.micro |
m | balanced: a typical server | m5.large |
c | compute: more CPU for each gigabyte | c5.large |
r | memory: more gigabytes for each CPU | r5.large |
Pick the family for the shape of the work, then the smallest size that fits; a type can be changed later. Sizes double as they go up: large has 2 CPUs, xlarge 4, 2xlarge 8, and the memory doubles with them.
Comparing types
describe-instance-types describes the types you name. The --query picks three fields from each, as in Chapter 1, so the table has one row per type:
aws ec2 describe-instance-types --instance-types t3.micro m5.large --query "InstanceTypes[].[InstanceType,VCpuInfo.DefaultVCpus,MemoryInfo.SizeInMiB]" --output table+---------------------------+
| DescribeInstanceTypes |
+---------------------------+
| t3.micro | 2 | 1024 |
| m5.large | 2 | 8192 |
+------------+-----+--------+Memory is in MiB: 1024 is one gigabyte. Any field of the answer can go in the list. With FreeTierEligible in place of the memory, as in --query "InstanceTypes[].[InstanceType,FreeTierEligible]", the table shows which types the free tier covers.
t3.micro is free-tier eligible, costs about a cent an hour after that, and is enough for every machine in this course.