Introduction
In this, I will talk about EC2 Instance a service provided by Amazon Web Services (AWS). EC2 stands for Elastic Cloud Compute used to create and manage Virtual Servers. This is a computing resource as the name says because it is capable of returning the output after processing the input.
It is a pay-as-you-go service.
Amazon EC2 provides scalable computing capacity in the AWS Cloud. Scalability in the sense we can upgrade or downgrade the resources as per our requirement such as CPU, Storage etc.
You can use Amazon EC2 to launch as many or as few Virtual servers as you need, configure security and networking and manage Storage.
Amazon EC2 is having two storage options for root volume i.e., EBS & Instance Store. EBS Volume is that volume that is stored somewhere in Cloud while Instance Store is a memory inside the Hypervisor. EBS is persistent while Instance Store is non-persistent i.e., data will be wiped out on the restart.
Pre-configured templates are available known as Amazon Machine Image. These templates contain the software with all the required configurations to run our application with little or no extra configuration. There are multiple paid/free AMIs available in the marketplace.
We can also create our own AMI using the EC2 instance and share it with multiple accounts and regions.
By default, when you create an EC2 account with amazon, your account is limited to a maximum size of 20 instances per region with two default High I/O instances.
Types Of EC2 Instances
General Purpose
General Purpose instances provide a Balance of computing, Memory and Networking resources, and can be used for a variety of workloads.
There are three series in General Purpose Instances. Instances are available in four sizes - Nano, Small, Medium and Large.
Series | Instance Type | Resource Type |
A Series | A1 | Medium & Large |
M Series | M4, M5, M5a, M5zn, M5n, M5ad, M6a, M6in, M6i, M7g, Mac | Large |
T Series | T2, T3, T3a | Nano, Small, Medium & Large |
A Series
It is used for Medium and large applications and contains a single type of instance in General Purpose i.e., A1.
Instances are ideally suited for scale-out workloads that are supported in the ARM ecosystem.
ARM's Ecosystem of software partners provides customers with a wide range of products to market faster than the competition. ARM development boards are the ideal platform for accelerating development and reducing the risk of new SoC Designs.
These instances are well suited for the following application -
Web Server
Containerized Micro-Services
Caching fleets
Distribution data stores
Applications that require ARM infrastructure set
The cache is a high-speed data storage layer that stores a subset of data typically transient in nature so that future requests for that are served up faster
M Series
It is used for large applications and contains five types of instances in General Purpose i.e., M4, M5, M5a and M5d. In M4, M5 and M5a are used frequently.
The new M4 instances feature a custom Intel Xenon E5-2676 v3 Haswell processor optimized specifically for EC2.
vCPU: 2 to 40 (Max)
RAM: 8GB to 160GB (Max)
Instance Storage: EBS Only
These instances provide an ideal cloud infra, offering a balance of compute, memory and Networking Resources for a broad range of applications.
These types of instances are mostly used for
Gaming servers
Web servers
Small and Medium Databases.
vCPU: 2 to 96 (Max)
RAM: 8GB to 384GB (Max)
Instance Storage: EBS & NVMe SSD. For M4 it's only EBS
T Series
It is used for Nano, Small, Medium and Large resources and contains three types of instances in General Purpose i.e., T2, T3 and T3a. This series is mostly used for testing and development. They are basic instances with low performance. They are cheap as compared to other series.
These instances provide a baseline level of CPU performance with the ability to burst to a higher level when required by workload.
Unlimited instances can sustain high CPU performance for any period whenever required.
These types of instances are mostly used for
Website and Web Server
Code Repositories
Development, build and test
Microservices
vCPU: 2 to 8 (Max)
RAM: 0.5GB to 32GB (Max)
Network: Upto 5Gbps
Compute Optimized
Compute Optimized instances are ideal for compute bound applications that benefit from high-performance processors. Instances belonging to this family are well suited 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.
C Series
All instances have the following specs:
Custom-built AWS Graviton3 Processor with 64-bit Arm cores
EBS Optimized
Enhanced Networking
Use Cases
High-performance computing (HPC), batch processing, ad serving, video encoding, gaming, scientific modeling, distributed analytics, and CPU-based machine learning inference.
vCPU: 1 to 192 (Max)
RAM: 2GB to 384GB (Max)
Network: Upto 40Gbps
Memory Optimized
Memory optimized instances are designed to deliver fast performance for workloads that process large data sets in memory.
R Series
X Series
z Series
All instances have the following specs:
Custom-built AWS Graviton3 processor with 64-bit Arm cores
EBS-optimized
Enhanced Networking†
Use cases
Memory-intensive workloads such as open-source databases, in-memory caches, and real-time big data analytics.
Storage Optimized
Storage optimized instances are designed for workloads that require high, sequential read and write access to very large data sets on local storage. They are optimized to deliver tens of thousands of low-latency, random I/O operations per second (IOPS) to applications.
l Series
D Series
H Series
Use Cases
These instances maximize the number of transactions processed per second (TPS) for I/O intensive and business-critical workloads which have medium size data sets and can benefit from high compute performance and high network throughput such as relational databases (MySQL, MariaDB, and PostgreSQL), and NoSQL databases (KeyDB, ScyllaDB, and Cassandra). They are also an ideal fit for workloads that require very fast access to medium size data sets on local storage such as search engines and data analytics workloads.
Accelerated Computing
Accelerated computing instances use hardware accelerators, or co-processors, to perform functions, such as floating point number calculations, graphics processing, or data pattern matching, more efficiently than is possible in software running on CPUs.
Use Cases
Machine learning, high performance computing, computational fluid dynamics, computational finance, seismic analysis, speech recognition, autonomous vehicles, and drug discovery.
High Performance
High performance computing (HPC) instances are purpose built to offer the best price performance for running HPC workloads at scale on AWS. HPC instances are ideal for applications that benefit from high-performance processors such as large, complex simulations and deep learning workloads.
Amazon EC2 Hpc6id instances are designed for memory-bound and data-intensive high performance computing (HPC) workloads such as finite element analysis (FEA) for crash simulations, seismic reservoir simulations, and structural simulations.
Features:
Up to 3.5 GHz all-core turbo frequency, 64 cores of Intel Xeon Scalable processors with 5 GB/s per vCPU of memory bandwidth and 1024 GiB of memory
Elastic Fabric Adapter (EFA) is enabled for inter-node network bandwidth speeds of up to 200 Gbps, delivering increased performance for network-intensive applications
Simultaneous multi-threading is disabled to optimize performance and cluster management
Powered by the AWS Nitro System, a combination of dedicated hardware and lightweight hypervisor