Before providing a breakdown of AWS instance types and a comparison of each, it's worthwhile explaining the different AWS cloud computing options, namely Amazon Elastic Compute Cloud Instances (Amazon EC2) and the Amazon Relational Database Service (Amazon RDS). We'll then move on to the different AWS instance types and a comparison of different use cases for each.
Amazon EC2 and Amazon RDS
Amazon EC2 Instances are essentially the same as a computer/server within your organization, except the computer/server is located elsewhere. Rather than buying the hardware, you rent virtual machines—which you connect to via the internet—and reserve them for your own use, or just pay-as-you-go for the time you're using them.
Amazon EC2 Instances allow businesses to benefit from powerful and expensive hardware, without the cost of purchasing, configuring, and maintaining that hardware. There's essentially no limit to the number of virtual machines and servers you can rent, which means you can scale up and down rapidly to respond to peaks and troughs in demand, develop applications faster, and get much better value for money and flexibility than is possible from on-premises hardware.
Amazon RDS is similar to Amazon EC2 but has been optimized for databases. You can run databases on Amazon EC2, although Amazon RDS has more features to automate many of the difficult and tedious tasks associated with relational database management such as backups, patching, failure detection, and recovery, albeit without some of the flexibility offered by Amazon EC2 Instances. While we'll touch on AWS instance types and comparison of RDS options, this post focuses on Amazon EC2 Instances, which are more commonly used.
AWS instances: the basics
The best place to start is with a description of an instance and an instance type. On AWS, an instance is a virtual machine that runs on a remote host machine (“hypervisor”) in a similar way to how a virtualized operating system runs on a desktop computer or server. The instance “type” is determined by the configuration of the hypervisor—which can be “General Purpose,” “Compute Optimized,” “Memory Optimized,” etc. Consequently, the hardware used will dictate the memory, storage, compute capabilities, and performance of the virtual machine.
What are the different AWS instance types?
AWS instances types are grouped together into families with several subcategories in each family. These subcategories are based on the hardware on which they're run, such as the number of virtual CPUs, memory (RAM), storage volume, and bandwidth capacity into and out of the instances.
AWS instance types should be selected based on the CPU and memory needs of different workloads and the network resources required. It's important to choose the correct AWS instance types as there are considerable price differences between the different families of AWS instances and the different AWS instance types within those families. For example, instances with extreme memory and CPU capacities can be very expensive. Therefore, it's important to provision each instance appropriately at the point of deployment and monitor utilization thereafter.
The different AWS instance types and comparison of capabilities
AWS instance types change frequently. As the cloud evolves and technology improves, processers become faster and more efficient so you can do more with less. It's always worth keeping an eye out for announcements from AWS about new generation instances in order to upgrade and maximize the benefits of operating in the cloud.
AWS instance families
- General Purpose (A1, T2, T3, T3a, T4g, M4, M5, M5a, M5n, M6g)
- Compute Optimized (C4, C5, C5a, C5n, C6g)
- Memory Optimized (R4, R5, R5a, R5n, R6g, X1, X1e, Z1d)
- Accelerated Computing (P2, P3, F1, G3, G4)
- Storage Optimized (D2, H1, I3, I3en)
The naming and numbering of different AWS instance types can be confusing. They consist of three different parts, with each instance type typically given a letter (A, C, D, I, F, G, H, M, P, R, T, X) to denote its family, followed by a number that denotes its generation (1, 2, 3, 4, 5, 6). Each generation has a slightly different set of features. Some AWS instance types also have an additional letter to reflect how they've been optimized. For example, the "g" in T4g and M6g General Purpose instances indicates that the instances are powered by Graviton 2 processors, which are 40% more efficient than their predecessors.
We've compiled a list of AWS instance types and a comparison of different use cases, which are detailed in the table below:
Table 1: AWS instance types and comparison of use cases
|Instance Family||Instance Types||Use Cases|
|General Purpose||A Instance Family||The A instance family consists of instances suitable for suited for scale-out and Advanced RISC Machine (ARM)-based workloads that are supported by the extensive Arm ecosystem.|
|General Purpose||T Instance Family||The T instance family consists of burstable instances suitable for websites, web applications, development environments, microservices, and line of business applications.|
|General Purpose||M Instance Family||The M instance family is suitable for small and mid-size databases, data processing tasks that require additional memory, cluster computing, and other enterprise applications.|
|Compute Optimized||C Instance Family||The compute-optimized C instance family is a better match for high-performance web servers and processes such as distributed analytics and high-performance computing.|
|Memory Optimized||R Instance Family||Memory intensive tasks such as high-performance database analytics and data mining processes are best suited by the R instance family along with mid-size in-memory databases and similar applications.|
|Memory Optimized||X and Z Instance Families||The X and Z instance families are designed for high performance, large enterprise databases with in-memory databases (e.g. SAP HANA), or big data processing engines (e.g. Apache Spark or Presto).|
|Accelerated Computing||P Instance Family||The P instance family is the one to use for tasks such as machine learning and those with high-performance requirements such as computational finance, seismic analysis, and speech recognition.|
|Accelerated Computing||G Instance Family||If a task involves 3D visualizations, graphics-intensive remote workstations, 3D rendering, application streaming, video encoding, or other graphics workloads, the G instance family is best.|
|Accelerated Computing||F Instance Family||The F instance family offers customizable hardware acceleration with field-programmable gate arrays (FPGAs for tasks such as genomics research, financial analytics, and real-time video processing.|
|Storage Optimized||H Instance Family||The H instance family is suitable for MapReduce-based workloads, distributed file systems, network file systems, log or data processing applications such as Apache Kafka, and big data workloads.|
|Storage Optimized||I Instance Family||Tasks suitable for the I instance family include NoSQL databases, in-memory databases (e.g. Aerospike), scale-out transactional databases, data warehousing, and analytics workloads.|
|Storage Optimized||D Instance Family (D2)||Finally, the D Instance family is best suited to tasks such as Massively Parallel Processing (MPP) data warehousing, MapReduce and Hadoop distributed computing, and log or data-processing applications.|
All the above AWS instance types are broken down further based on the size of the instance and the amount of the resource (nano, micro, small, medium, large, xlarge, 2xlarge, 4xlarge, 8xlarge, 10xlarge, 16xlarge, and 32xlarge).
Amazon RDS Instances are also based on processing power and memory requirements and are split into three classes: General Purpose (db.m4, db.m5, db.m6g), Memory Optimized (db.r4, db.r5, db.r6g, db.x1, db.x1e, db.z1d), and Burstable Performance (db.t2, db.t3), and also have multiple size options within each of the instance types. Generally speaking, the greater the instance size, the greater the cost.
AWS instance types and comparison of purchasing options
As previously mentioned, there are considerable differences in pricing between families and instance types. Prices can change frequently so we won't cover actual prices, only the primary purchasing options.
One of the main benefits of EC2 Instances are their flexibility and scalability. EC2 Instances can be purchased On-Demand whenever they're needed. Instances can be provisioned and terminated as required and are billed by the hour that the instance is running. This option gives users maximum flexibility to scale up and down when it's required, but it's the most expensive way of purchasing AWS instances.
EC2 Reserved Instances allow users to purchase instances for a finite period—one or three years—and are offered at a highly discounted rate, with the option of paying all upfront, partially upfront, or throughout the term. Businesses can purchase Standard Reserved Instances, or the more flexible, Convertible Reserved Instances, which due to their convertibility, don't offer a significantly large discount.
The option also exists with AWS Savings Plans to commit to a specific monthly spend rather than a specific instance family. This provides even more flexibility than Convertible Reserved Instances, and the committed spend can be spread among AWS compute instances, Fargate, and some Lambda functions. You can find out more about making the most of AWS Savings Plans in our Ultimate Guide to AWS Savings Plans.
EC2 Spot Instances are unused EC2 instances that are sold cheaply for short periods of usage. These are the most economical instances to use, but not usually available during peak times of demand. Prices fluctuate based on supply and demand and users can bid on these instances and set their maximum price. However, the caveat is they can be terminated when AWS wants the EC2 Instances back and only two minutes notice is provided, although they do allow work to be paused and resumed.
With all these options, the underlying hardware is shared with other customers, but it's possible to pay for Dedicated Instances, which are instances that run on a virtual PC or hardware dedicated to a single customer and isolated from other customers´ instances at the hardware level.
In addition to the above purchasing options, prices are dictated by the instance type, the type of Amazon Machine Instance used, the data transfer capability, the region the instance is provisioned in, and whether they're EBS-optimized.
The importance of effective management and rightsizing resources
Naturally, you need to ensure that the correct instance type is chosen to meet your performance needs, but it's also vital to ensure that the instance type is not too large for your planned workload. If you overprovision, you'll end up paying for resources that are underutilized.
It's important to get this right initially, but requirements also change over time. Rightsizing and performance matching need to be ongoing processes to ensure the best ROI is achieved. The potential cost savings from the careful management of cloud environments can be considerable. Many businesses find that they can save up to 60% on their cloud bills with effective management.
Establishing a Cloud Financial Management practice can also help effectively manage AWS resources. Cloud Financial Management (CFM), also known as Cloud Cost Management, is a function that helps align and develop financial goals, drive a cost-conscious culture, establish guardrails to meet financial targets, and gain greater business efficiencies. Learn more about establishing a Cloud Financial Management practice here.