AWS EC2 Instance Types & Comparison in 2021
Here is the list of topics that will be covered in this blog in case you want to jump to a specific one.
- Overview of AWS EC2
- Categories of EC2 Instance Types
- A real-world example of EC2 usage:
Do you want to learn more about AWS EC2 Instance Types? Watch this video tutorial now:
Overview of AWS EC2
Amazon EC2 Instance is essentially the same as a computer/server, with the exception that the computer/server is located somewhere else. Rather than purchasing the hardware, you rent virtual machines that you connect to via the internet and reserve for your own use, or simply pay-as-you-go for the time you use them. You can manage AWS instances through the AWS console, AWS command-line interface, or AWS SDK
Amazon EC2 Instances enable businesses to take advantage of powerful and expensive hardware without incurring the costs of purchasing, configuring, and maintaining that hardware. There is essentially no limit to the number of virtual machines and servers you can rent, which means you can scale up and down quickly to respond to demand peaks and troughs, develop applications faster, and get much better value for money and flexibility than on-premises hardware.
Categories of EC2 Instance Types
These are the broad categories of EC2 instance types that are offered by AWS.
|General Purpose||Mac T-family: T2, T3, T3a, T4g M-family M4, M5zn, M5n, M5a, M5, M6g||T is for tiny M is for the main|
|Compute Optimized||C-family: C4, C5n, C5a, C5, C6gn, C6g||C is for compute|
|Memory-Optimized||High Memory X&Z-family: z1d, X1, X1e, X2gd R-family: R4, R5n, R5b, R5a, R5, R6g||X is for eXtreme Z is for zippy R is for RAM|
|Accelerated Computing||F1 G-family: G3, G4ad, G4dn Inf1 P2, P3, P4||F is for FPGA G is for graphics Inf is for inference P is for pictures|
|Storage Optimized||H1 I-family: I3, I3en D-family: D2,D3,D3en||H is for HDD I is for IOPS D is for dense|
More about Amazon Web Services can be learnt from our blog on AWS Tutorial!
General-purpose instances offer a good mix of compute, memory, and networking resources and can be used for a wide range of workloads. These instances are ideal for applications like web servers and code repositories that use these resources in equal parts.
Within the General Purpose family there are many EC2 instance types:
Mac instances are built on the AWS Nitro System and powered by Apple Mac mini computers. This EC2 family provides developers with access to macOS, allowing them to develop, build, test, and sign applications that require the Xcode IDE.
T2, T3, T3a, T4g
The T instance family includes burstable instances that are appropriate for websites, web applications, development environments, microservices, and line of business applications.
M4, M5zn, M5n, M5a, M5, M6g
The M instance family is appropriate for small and medium-sized databases, data processing tasks that require more memory, cluster computing, and other enterprise applications.
Amazon EC2 A1 instances offer significant cost savings and are ideal for scale-out and Arm-based workloads supported by the Arm ecosystem. They are the first EC2 instances powered by AWS Graviton Processors, which include 64-bit Arm Neoverse cores and AWS-designed custom silicon.
Compute Optimized instances are best suited for compute-intensive applications that benefit from high-performance processors. This family’s instances are ideal for batch processing workloads, media transcoding, high-performance web servers, high-performance computing (HPC), scientific modeling, dedicated gaming servers, and ad server engines, machine learning inference, and other compute-intensive applications.
Within the Compute Optimized family there are many EC2 instance types:
C4, C5n, C5a, C5, C6gn, C6g
The compute-optimized C instance family is a better fit for high-performance web servers as well as processes like distributed analytics and high-performance computing.
Learn more about Amazon web services and get certified with our AWS Certification courses.
Memory-optimized instances are intended to provide fast performance for workloads that require large data sets to be processed in memory.
Within the Memory Optimized family there are many EC2 instance types:
High memory instances are designed specifically for running large in-memory databases in the cloud, such as SAP HANA production deployments.
z1d, X1, X1e, X2gd
The X and Z instance families are intended for high-performance, large enterprise databases that use in-memory databases such as SAP HANA or big data processing engines (e.g. Apache Spark or Presto).
R4, R5n, R5b, R5a, R5, R6g
Memory-intensive tasks such as high-performance database analytics and data mining processes, as well as mid-size in-memory databases and similar applications, are best suited by the R instance family.
Accelerated computing instances use hardware accelerators, also known as co-processors, to perform functions such as floating-point number calculations, graphics processing, as well as data pattern matching more efficiently than software running on CPUs.
Within the Accelerated Computing family there are many EC2 instance types:
For workloads like genomics research, financial analytics, and real-time video processing, the F instance family provides customized hardware acceleration with field-programmable gate arrays (FPGAs).
G3, G4ad, G4dn
The G instance family is best for 3D visualizations, graphics-intensive remote workstations, 3D rendering, application streaming, video encoding, and other graphics workloads.
These instance types are built from the ground up to support machine learning inference applications.
P2, P3, P4
For activities like machine learning and those requiring high performance, such as computational finance, seismic analysis, and speech recognition, the P instance family is the one to employ.
Preparing for job interviews? Have a look at our blog on AWS Interview Questions and answers now!
Storage optimized instances are intended for workloads that necessarily involve high-speed, sequential read and write access to very large data sets on local storage. They are designed to provide applications with tens of thousands of low-latency, random I/O operations per second (IOPS).
Within the Storage Optimized family there are many EC2 instance types:
These instances come with up to 16 TB of local storage on HDDs, excellent disc throughput, and a good balance of CPU and memory.
The D Instance family is ideally suited for workloads like data warehousing employing massively parallel processing (MPP), MapReduce and Hadoop distributed computing, and log or data-processing applications.
NoSQL databases, in-memory databases (e.g. Aerospike), scale-out transactional databases, data warehousing, and analytics workloads are all suited for the I instance family.
Real-world example of EC2 usage
Amazon EC2 Mac instance
One of the newest additions to the AWS EC2 instance families is Mac instances. It enables customers to run on-demand macOS workloads in the cloud, extending AWS’s flexibility, scalability, and cost benefits to all Apple developers. It was announced in re-invent 2020.
EC2 Mac instances are built on Apple Mac mini computers with Intel Core i7 processors and are powered by AWS Nitro System. Customers can choose between macOS Mojave (10.14), macOS Catalina (10.15), and macOS Big Sur (11.2.1).
Ideal Use cases:
Developing, building, testing, and signing iOS, macOS, iPadOS, WatchOS, and tvOS applications on the Xcode IDE.
Case study of Mac instance
Flipboard is an award-winning app that curates news and information in a user-friendly magazine layout for millions of customers.
Colin Caufield, Lead iOS Engineer, Flipboard says that his team has benefitted from AWS EC2 MAC instances in the following ways:
- Build times of the app have been reduced from 20 minutes to 5 minutes.
- UI automation tests that used to take three hours are now completed in less than an hour.
- Download speeds are amazing.
- VNC sessions are as smooth as butter.
In general, EC2 instance types — their broad categories of specialization — have remained consistent, but the precise models and sizes within each category change frequently, so it’s critical to stay up to date. The fundamental reason for this is that generational advances within instance types result in more powerful offers and cheaper costs, so you should be aware that top-of-the-line one year may not be top-of-the-line the next.
Have a doubt on this topic? Head towards our AWS Community right away!