AWS Compute Blog

It just got easier to discover and compare EC2 instance types

This post is contributed by Laura Thomson | Sr. Product Manager for EC2

Since 2007 we have introduced over 200 different instance types. Some of which include the new sizes of C5d and EC2 High Memory instances that were recently made available. This broad selection means that you get better price and performance for a wide variety of workloads. With over 200 instances to choose from, finding the right instance type can be challenging. To make it easier for customers to discover and compare EC2 Instance Types, we now have a new “Instance Types” section of the EC2 Console and two new APIs: DescribeInstanceTypes and DescribeInstanceTypeOfferings. With this offering, you have access to instance type specifications, supported features, Regional presence, pricing, and more.

Until now, cloud architects and DevOps engineers needed to reference multiple data sources and test multiple instance types before making a selection. This process was time consuming and needed to be repeated for each new workload and to continue to optimize existing workloads as needs evolved and new EC2 instance types and features were released. Now there is a single source of information for all instance types, enabling customers to compare options and have the latest information easily accessible, both programmatically and in the EC2 Console.

This blog walks you through how to take advantage of these new offerings so that you can find the right instance type for your workload. I demonstrate how to use filters to get a list of instance types that meet your requirements. I also show how to compare instance type to quickly identify the differences. Sample commands are included to help you get started with the AWS Command Line Interface.

Compare Instance Types

In the following steps, I walk through how to navigate the EC2 Console, so that you can find and compare instance types that meet your requirements.

  1. First, navigate to the new “Instance Types” section.

 

2. If needed, customize the information shown in the table by clicking the gear icon and toggle on or off attributes. This allows you to see

only the information that is important to you.

 

 

 

 

 

 

 

 

 

 

3. Next, to limit the list to only instance types that meet your workload requirement, search or set filters in the search bar. You can input search terms directly or use filters to filter specific attributes.

For example, setting “Current generation” to “true” displays only current generation instance types. Typing in the term “metal” limits results to only .metal instance types.  Ranges can be set using the “max” and “min” filters. For example, the “Min Memory (MiB)” filter limits the list to only instance type with at least the minimum memory required.

    

  1. To see all attributes for one instance type, click the check box in the leftmost column. To compare multiple instance types, select them all.

For example, in the following image I selected the three least expensive options that met my criteria.  The selected instances are shown side-by-side in the detail pane for easier comparison. The bold text in the detail pane highlights attributes that that are different between the compared instance types.

Access Instance Type information programmatically

This console experience is powered by the new APIs: DescribeInstanceTypes and DescribeInstanceTypeOfferings. You can use these APIs individually or in combination to return information about a specific instance type or to return instance types that meet your specifications.

Here are a few examples to get you started:

 

Similar to how you set filters in the console, the API responses can also be filtered. For example, the following command in the AWS CLI returns all current generation instance types.

aws ec2 describe-instance-types  --filter Name=current-generation,Values=true

You can also filter using partial strings. This comes in handy for fields with multiple parts. For example, the following command in the AWS CLI returns all C5d instance types. A partial string is needed because the instance type field also includes additional postscripts and the size.

aws ec2 describe-instance-types  —filter Name=instance-type,Values=c5d*

DescribeInstanceTypeOfferings can be called to verify that your preferred instance types are offered in a particular region. The following command in the AWS CLI returns a list of all instance types available in your current Region.

aws ec2 describe-instance-type-offerings

You can add this filter to limit the response to only instance types you are considering.

--filter Name=instance-type,Values=i3.metal,m5.metal,z1d.metal

Conclusion

More accessible instance type information makes it easier for you to discover and compare instance types and stay up to date on the latest offerings. It’s now quicker to get started with new workloads and to optimize the instance types used for running workloads. This is available in all commercial AWS regions. Read the documentation to learn more. Please feel free to leave your comments below!