aws ec2 instance types

Understanding AWS EC2 Instance Types

AWS EC2 Instance Types

Amazon EC2 offers 275 AWS EC2 instance types that are optimized for different workloads. If your needs require compute-heavy processing, you can use compute optimized instances for compute-intensive workloads to provide the highest performance. If your application run machine learning ir deep learning, accelerated computing instances with hardware accelerators can provide a significant speed boost to your applications. For applications like big data analytics or video transcoding that require large amounts of local storage, Storage optimized instances can be ideal solution.

For workloads that require a balance of compute, memory and network resources, general purpose or memory optimized instances can be better choice. These instances offer high amounts of RAM and fast network connectivity. You can chose a general-purpose instance type that can handle a wide range of workloads if you are not sure about your application characteristic.

You should also select the instance size according to your application requirements. Larger instance sizes offer more CPU, memory and network resources but of course the cost will multiply too. Choosing best size according to your need is crucial.

If you require higher bandwidth and lower latency networking Enhanced networking option can be a good one to consider. This feature might be suitable for web servers which can help improve the performance and reliability of your web application.

Additionally, Amazon EC2 instance families offer other range of instance types with different specifications and performance characteristics. For example, the graphics processing instance family is optimized for graphics-intensive workloads while the memory optimized instance family is optimized for memory-intensive workloads.

Choosing the right AWS EC2 instance type is crucial for both cost-optimization and performance.

Amazon did not just randomly decide to create a huge number of AWS EC2 instance types. It created them because it wanted to allow organizations to have an instance type that was tailored to their exact needs. Getting the closest possible match between your instance type and your activity makes the best possible use of resources and hence minimizes costs. With that in mind, here is a quick overview of the AWS EC2 instance types and what they mean in practice.

Related Article

AWS EC2 Pricing

General Purpose AWS EC2 instance types

There are 9 main types of AWS EC2 instance types, which are further subdivided into different sizes according to the exact resources they offer. These AWS EC2 instance types provide a balance of CPU power, memory and network resources.

Six of these AWS EC2 instance types are fixed-performance instance types and three are burstable instance types. The burstable instance types “earn” CPU credits when the CPU works below the baseline threshold and then can “spend” them to go up to maximum power. They can stay at maximum power for an unlimited period as long as they have earned enough credit.

Compute Optimized AWS EC2 instance types

There are three of these in total and only one of them is subdivided into different sizes. They are equipped with high-performance processors which can cost-effectively handle compute-intensive workloads.

Memory-Optimized AWS EC2 instance types

There are 8 of these in total, subdivided into different sizes. They are optimized for memory and, as such, are generally used for processing larger datasets in memory.

Accelerated Computing AWS EC2 instance types

There are 6 of these in total, subdivided into different sizes. They are equipped with hardware accelerators or co-processors so as to be able to perform high-performance computing functions, such as floating-point number calculations.

Storage Optimized AWS EC2 instance types

There are four of these, subdivided into different sizes. Two instance types are based on Non-Volatile Memory Express backed by SSD and the other two are Hard Disk Drives, but not via EBS. The (NVMe) SSD-backed Storage Optimized AWS EC2 instance types are optimized for minimal latency and the HDD Storage Optimized AWS EC2 instance types are optimized for maximum throughput.

Storage in AWS EC2 instance types

Other than the Storage Optimized AWS EC2 instance types, most of the AWS EC2 instance types use Amazon Elastic Block Store (EBS). As its name suggests, this is a block storage service and it was specifically designed to be used with EC2 instances. There are four different volume types, two on SSD and two on HDD.

Some of the AWS EC2 instance types have EBS optimization turned on by default. Currently, these are C5, C4, M5, M4, P3, P2, G3, and D2 AWS EC2 instance types. Some other instance types can have this feature added at an extra cost. EBS optimization delivers dedicated throughput between Amazon EC2 and Amazon EBS. In other words, it minimizes contention between Amazon EBS I/O and other traffic from your EC2 instance and thus makes full use of the IOPS provisioned on an EBS volume.

The EBS volumes on SSD prioritize speed, with the highest-performance option being intended for the most latency-sensitive tasks (such as running SAP HANA) and the general-purpose option is intended for tasks that benefit from the speed but which can handle a bit of latency if need be.

The EBS volumes on HDD are intended for tasks that are more about throughput than speed, but even here, there is a faster option for frequently-accessed workloads as well as a slower one for those who want the minimum possible cost and are prepared to accept a reduction in speed as a fair trade-off.

A note on cluster networking

AWS EC2 is not currently huge on cluster networking, although this may come in the future. It is, however, already supported by some instance types and where it is possible, it facilitates low-latency networking between all instances in the cluster.

In principle, you can create a VPC which spans different regions, but, in practice, you are probably going to get the best results if you can keep your data within one region, plus this will tend to be more cost-effective as intra-regional traffic tends to be free whereas inter-regional traffic tends to be chargeable.

That said, if you want the highest level of performance, for example, if you are working in science or engineering and need to undertake heavy-duty calculations, then it may be an option worth exploring, even if it comes at a price.