4 vCPU, 16 GiB instances: AWS vs Azure
93 current instance types have 4 vCPUs and 16 GiB of memory: 48 on AWS EC2 and 45 on Azure. The cheapest 4 vCPU, 16 GiB option is Standard_B4ps_v2 on Azure at $0.134 per hour on demand (East US). The cheapest on AWS is t4g.xlarge at $0.1344, about the same price.
Every 4 vCPU, 16 GiB option, cheapest first
| Cloud | Type | vCPUs | Memory (GiB) | On-demand /hr | 1-yr reserved /hr | Spot /hr |
|---|---|---|---|---|---|---|
| Azure | Standard_B4ps_v2 | 4 | 16 | $0.134 | $0.0793 | $0.1206 |
| AWS | t4g.xlarge | 4 | 16 | $0.1344 | $0.0843 | $0.0422 |
| Azure | Standard_D4ps_v6 | 4 | 16 | $0.14 | $0.0829 | $0.0611 |
| Azure | Standard_B4as_v2 | 4 | 16 | $0.15 | $0.0887 | $0.135 |
| AWS | t3a.xlarge | 4 | 16 | $0.1504 | $0.0943 | $0.0371 |
| AWS | m6g.xlarge | 4 | 16 | $0.154 | $0.0966 | $0.0832 |
| Azure | Standard_D4ps_v5 | 4 | 16 | $0.154 | $0.0909 | $0.0326 |
| AWS | m7g.xlarge | 4 | 16 | $0.1632 | $0.108 | $0.0867 |
| Azure | Standard_B4ms | 4 | 16 | $0.166 | – | – |
| Azure | Standard_B4s_v2 | 4 | 16 | $0.166 | $0.0982 | $0.1494 |
| AWS | t3.xlarge | 4 | 16 | $0.1664 | $0.1043 | $0.0352 |
| AWS | m5a.xlarge | 4 | 16 | $0.172 | $0.108 | $0.0672 |
| Azure | Standard_D4as_v5 | 4 | 16 | $0.172 | $0.1062 | $0.0363 |
| Azure | Standard_DC4as_cc_v5 | 4 | 16 | $0.172 | – | $0.0363 |
| Azure | Standard_DC4as_v5 | 4 | 16 | $0.172 | $0.1376 | $0.0363 |
| AWS | m6a.xlarge | 4 | 16 | $0.1728 | $0.1143 | $0.0653 |
| AWS | m8g.xlarge | 4 | 16 | $0.1795 | $0.1188 | $0.0765 |
| AWS | m6gd.xlarge | 4 | 16 | $0.1808 | $0.1139 | $0.0875 |
| Azure | Standard_D4pds_v5 | 4 | 16 | $0.181 | $0.1066 | $0.0383 |
| Azure | Standard_D4as_v6 | 4 | 16 | $0.182 | $0.1072 | $0.0384 |
| Azure | Standard_D4as_v7 | 4 | 16 | $0.182 | $0.1072 | $0.0353 |
| Azure | Standard_D4pds_v6 | 4 | 16 | $0.184 | $0.1083 | $0.0803 |
| AWS | t2.xlarge | 4 | 16 | $0.1856 | $0.115 | $0.0403 |
| AWS | m7i-flex.xlarge | 4 | 16 | $0.1915 | $0.1267 | $0.0616 |
| AWS | m5.xlarge | 4 | 16 | $0.192 | $0.121 | $0.0391 |
| AWS | m6i.xlarge | 4 | 16 | $0.192 | $0.127 | $0.0849 |
| Azure | Standard_D4_v3 | 4 | 16 | $0.192 | – | $0.0384 |
| Azure | Standard_D4_v4 | 4 | 16 | $0.192 | $0.1132 | $0.0405 |
| Azure | Standard_D4_v5 | 4 | 16 | $0.192 | $0.1185 | $0.0405 |
| Azure | Standard_D4a_v4 | 4 | 16 | $0.192 | $0.1129 | $0.0405 |
| Azure | Standard_D4as_v4 | 4 | 16 | $0.192 | $0.1129 | $0.0405 |
| Azure | Standard_D4s_v3 | 4 | 16 | $0.192 | – | $0.0384 |
| Azure | Standard_D4s_v4 | 4 | 16 | $0.192 | $0.1129 | $0.0405 |
| Azure | Standard_D4s_v5 | 4 | 16 | $0.192 | $0.1185 | $0.0405 |
| AWS | m9g.xlarge | 4 | 16 | $0.1957 | – | $0.0716 |
| AWS | m4.xlarge | 4 | 16 | $0.2 | $0.1239 | $0.0681 |
| Azure | Standard_DC4as_v6 | 4 | 16 | $0.2 | $0.1598 | $0.0422 |
| AWS | m8i-flex.xlarge | 4 | 16 | $0.2011 | – | $0.0579 |
| AWS | m7i.xlarge | 4 | 16 | $0.2016 | $0.1334 | $0.0834 |
| Azure | Standard_D4s_v6 | 4 | 16 | $0.202 | $0.125 | $0.0426 |
| AWS | m5ad.xlarge | 4 | 16 | $0.206 | $0.13 | $0.0752 |
| Azure | Standard_D4ads_v5 | 4 | 16 | $0.206 | $0.1216 | $0.0435 |
| Azure | Standard_DC4ads_cc_v5 | 4 | 16 | $0.206 | – | $0.0435 |
| Azure | Standard_DC4ads_v5 | 4 | 16 | $0.206 | $0.1648 | $0.0435 |
| AWS | m8i.xlarge | 4 | 16 | $0.2117 | – | $0.0753 |
| AWS | m7gd.xlarge | 4 | 16 | $0.2136 | $0.1345 | $0.0946 |
| Azure | Standard_DC4es_v6 | 4 | 16 | $0.222 | $0.1774 | $0.041 |
| AWS | m5d.xlarge | 4 | 16 | $0.226 | $0.142 | $0.0695 |
| Azure | Standard_D4d_v4 | 4 | 16 | $0.226 | $0.1329 | $0.0478 |
| Azure | Standard_D4d_v5 | 4 | 16 | $0.226 | $0.1333 | $0.0485 |
| Azure | Standard_D4ds_v4 | 4 | 16 | $0.226 | $0.1329 | $0.0478 |
| Azure | Standard_D4ds_v5 | 4 | 16 | $0.226 | $0.1333 | $0.0485 |
| Azure | Standard_D4ads_v6 | 4 | 16 | $0.228 | $0.1345 | $0.0481 |
| Azure | Standard_D4ads_v7 | 4 | 16 | $0.228 | $0.1345 | $0.0442 |
| AWS | m8gd.xlarge | 4 | 16 | $0.2306 | – | $0.0705 |
| AWS | m7a.xlarge | 4 | 16 | $0.2318 | $0.1534 | $0.0799 |
| AWS | m6id.xlarge | 4 | 16 | $0.2373 | $0.1495 | $0.0757 |
| AWS | g6f.xlarge | 4 | 16 | $0.2375 | – | $0.0815 |
| AWS | m5n.xlarge | 4 | 16 | $0.238 | $0.15 | $0.0828 |
| AWS | m8a.xlarge | 4 | 16 | $0.2434 | – | $0.0593 |
| Azure | Standard_D4ds_v6 | 4 | 16 | $0.249 | $0.1545 | $0.0524 |
| Azure | Standard_DC4ads_v6 | 4 | 16 | $0.251 | $0.2007 | $0.053 |
| AWS | m9gd.xlarge | 4 | 16 | $0.2514 | – | $0.0626 |
| AWS | m8id.xlarge | 4 | 16 | $0.261 | – | $0.0794 |
| Azure | Standard_D4s_v7 | 4 | 16 | $0.265 | – | $0.049 |
| AWS | m5dn.xlarge | 4 | 16 | $0.272 | $0.171 | $0.1219 |
| Azure | Standard_F4as_v6 | 4 | 16 | $0.273 | $0.1694 | $0.0575 |
| Azure | Standard_F4as_v7 | 4 | 16 | $0.273 | $0.1694 | $0.053 |
| Azure | Standard_DC4eds_v6 | 4 | 16 | $0.274 | $0.2193 | $0.0506 |
| Azure | Standard_D4ns_v6 | 4 | 16 | $0.278 | $0.1638 | $0.0586 |
| AWS | m6in.xlarge | 4 | 16 | $0.2785 | $0.1754 | $0.0799 |
| AWS | m8gb.xlarge | 4 | 16 | $0.291 | – | $0.129 |
| AWS | m8gn.xlarge | 4 | 16 | $0.291 | – | $0.107 |
| Azure | Standard_D4nds_v6 | 4 | 16 | $0.293 | $0.1728 | $0.0617 |
| AWS | m6idn.xlarge | 4 | 16 | $0.3182 | $0.2005 | $0.0892 |
| Azure | Standard_D4ds_v7 | 4 | 16 | $0.326 | – | $0.0602 |
| AWS | m5zn.xlarge | 4 | 16 | $0.3303 | $0.2081 | $0.1092 |
| Azure | Standard_NV4ads_V710_v5 | 4 | 16 | $0.333 | $0.2583 | $0.0615 |
| AWS | m8ib.xlarge | 4 | 16 | $0.3342 | – | $0.1117 |
| AWS | m8in.xlarge | 4 | 16 | $0.3342 | – | $0.097 |
| Azure | Standard_F4ads_v7 | 4 | 16 | $0.343 | $0.2127 | $0.0665 |
| AWS | im4gn.xlarge | 4 | 16 | $0.3638 | $0.2333 | $0.0895 |
| AWS | g4ad.xlarge | 4 | 16 | $0.3785 | – | $0.1118 |
| AWS | m8idb.xlarge | 4 | 16 | $0.3819 | – | $0.1072 |
| AWS | m8idn.xlarge | 4 | 16 | $0.3819 | – | $0.1189 |
| Azure | Standard_DC4s_v2 | 4 | 16 | $0.384 | – | $0.1036 |
| AWS | m8azn.xlarge | 4 | 16 | $0.4129 | – | $0.125 |
| AWS | m8ine.xlarge | 4 | 16 | $0.4177 | – | $0.1151 |
| AWS | d3en.xlarge | 4 | 16 | $0.526 | $0.331 | $0.0691 |
| AWS | g4dn.xlarge | 4 | 16 | $0.526 | $0.331 | $0.2108 |
| AWS | inf2.xlarge | 4 | 16 | $0.7582 | $0.4777 | $0.1075 |
| AWS | g6.xlarge | 4 | 16 | $0.8048 | $0.5239 | $0.3847 |
| AWS | g5.xlarge | 4 | 16 | $1.006 | $0.6338 | $0.499 |
Other sizes
On-demand Linux prices in USD per hour, in each cloud's home region: US East (N. Virginia) for AWS, East US for Azure. Previous-generation types are left out.