Multi-Cloud · lesson 3 of 8
Intermediate
5Advanced
3Also part of Multi-Cloud
8- + CloudWatch Monitoring Basics from AWS
- + Azure Monitor Basics from Azure
- + Cloud Monitoring Basics from Google Cloud
- + AWS Cost and Well-Architected Basics from AWS
- + Azure Cost Management Basics from Azure
- + GCP Cost and Billing Basics from Google Cloud
- + Availability, Regions, and the Arithmetic of Nines from Cloud Interviews
- + Scaling, Queues, and Backpressure from Cloud Interviews
Compute Instance Types Decoded: AWS vs Azure vs GCP
One workload — 4 vCPU, 16 GB RAM, general purpose — priced and decoded across AWS, Azure, and GCP naming conventions, with real on-demand rates compared.
By SkillByExample · Published
Same workload — 4 vCPU, 16 GB RAM, general purpose, no GPU, no local NVMe requirement — on three clouds. The specs match almost exactly; the names don’t look like it.
The instances
| Cloud | Instance type | vCPU | RAM | On-demand (approx, list price) |
|---|---|---|---|---|
| AWS | m5.xlarge | 4 | 16 GB | $0.192 / hr |
| AWS (burstable) | t3.xlarge | 4 | 16 GB | $0.166 / hr |
| Azure | Standard_D4s_v5 | 4 | 16 GB | $0.192 / hr |
| GCP | n2-standard-4 | 4 | 16 GB | $0.194 / hr |
These are published list rates for a US region, on-demand, Linux — not a quote, and they move (a few cents, roughly quarterly). The number that survives any price change is the one worth remembering: the three non-burstable options land within a cent of each other. General-purpose compute is the most commoditized layer of any cloud, so on-demand price is a weak differentiator — reserved/committed-use discounts, egress, and managed-service fit are where the real cost differences show up.
Decoding the names
AWS: m5.xlarge
m 5 xlarge
| | |
family generation size
m= general purpose family (t= burstable,c= compute-optimized,r= memory-optimized)5= 5th generation of that family’s underlying hardwarexlarge= size tier. Sizes double each step:medium(1 vCPU) ->large(2) ->xlarge(4) ->2xlarge(8) ->4xlarge(16) — RAM doubles in lockstep for a given family, which is whyxlargereliably means 4 vCPU / 16 GB across the wholem5line.
Azure: Standard_D4s_v5
Standard_ D 4 s _v5
| | | |
family vCPU premium- generation
storage
D= general purpose family (E= memory-optimized,F= compute-optimized)4= vCPU count, stated directly in the name — no lookup table neededs= supports Premium SSD/Ultra Disk (its absence,Standard_D4_v5, caps you at Standard SSD/HDD — the same vCPU and RAM either way)v5= generation
GCP: n2-standard-4
n2 - standard - 4
| | |
series tier vCPU
n2= machine series (2nd-generation general purpose;n1is the older series,c2is compute-optimized,m2is memory-optimized)standard= memory tier for this series (highmemdoubles RAM per vCPU,highcpuquarters it)4= vCPU count, also stated directly — GCP and Azure both put the number in the name; AWS is the one where you memorize (or look up) whatxlargemeans.
Checking the specs against the cloud’s own source of truth
Rather than trust a table (including this one, months from now), ask each CLI directly.
aws ec2 describe-instance-types --instance-types m5.xlarge \
--query "InstanceTypes[0].{vCPU:VCpuInfo.DefaultVCpus,MemoryMiB:MemoryInfo.SizeInMiB}"
$ aws ec2 describe-instance-types --instance-types m5.xlarge --query "InstanceTypes[0].{vCPU:VCpuInfo.DefaultVCpus,MemoryMiB:MemoryInfo.SizeInMiB}"
{
"vCPU": 4,
"MemoryMiB": 16384
}
az vm list-skus --size Standard_D4s_v5 --resource-type virtualMachines \
--query "[0].capabilities[?name=='vCPUs' || name=='MemoryGB']"
$ az vm list-skus --size Standard_D4s_v5 --resource-type virtualMachines --query "[0].capabilities[?name=='vCPUs' || name=='MemoryGB']"
[
{ "name": "vCPUs", "value": "4" },
{ "name": "MemoryGB", "value": "16" }
]
gcloud compute machine-types describe n2-standard-4 --zone=us-central1-a \
--format="value(guestCpus,memoryMb)"
$ gcloud compute machine-types describe n2-standard-4 --zone=us-central1-a --format="value(guestCpus,memoryMb)"
4 16384
All three agree: 4 vCPU, 16384 MiB. The naming schemes disagree; the hardware you’re renting doesn’t.
Practice
1. Find the AWS instance type that is one size step down from `m5.xlarge`, and state its vCPU/RAM without looking it up.
m5.large — the size tier below xlarge. Following the doubling pattern, that’s 2 vCPU
and 8 GB RAM, half of m5.xlarge on both dimensions.
2. Name the Azure size that has the same vCPU/RAM as `Standard_D4s_v5` but without Premium SSD support.
Standard_D4_v5 — dropping the s removes Premium SSD/Ultra Disk support and nothing
else; vCPU and RAM stay 4 and 16 GB.
3. Find the GCP high-memory equivalent of `n2-standard-4` and state its RAM.
gcloud compute machine-types describe n2-highmem-4 --zone=us-central1-a --format="value(guestCpus,memoryMb)"
4 32768
Same 4 vCPU, double the RAM (32 GB vs 16 GB) — highmem doubles the memory-per-vCPU ratio
within the same series and vCPU count.
4. A workload needs 4 vCPU but only bursts above 20% CPU a few minutes an hour. Which instance type saves the most money, and on which cloud?
AWS’s t3.xlarge at ~$0.166/hr — about 13% cheaper than m5.xlarge — because burstable
instances bill for baseline CPU and let you spend accumulated credits during short spikes.
Azure and GCP don’t have a directly equivalent credit-based discount tier at this size;
their standard general-purpose price is the standard price whether the CPU is idle or not.
5. Compare `m5.xlarge`'s on-demand price to its 1-year and 3-year Reserved Instance price using the AWS CLI or Pricing Calculator, and compute the discount percentage.
aws pricing get-products --service-code AmazonEC2 \
--filters "Type=TERM_MATCH,Field=instanceType,Value=m5.xlarge" "Type=TERM_MATCH,Field=location,Value=US East (N. Virginia)"
A 1-year no-upfront Reserved Instance typically runs 30-40% below on-demand, and a 3-year all-upfront commitment 50-60% below — this is exactly the discounting lever mentioned above that on-demand list price hides completely.
Next: the same upload-list-sign task against S3, Blob Storage, and GCS, one script per cloud, with the actual output from each API.