Everything You Need to Know About AWS Ec2
In this article, we will learn about what is AWS EC2 and what features it provides.
So, let's get started...
What is EC2?
Amazon Elastic Compute Cloud(EC2) is like your desktop computer which is located somewhere around the globe and accessible over the internet.
When creating an EC2 instance, you can specify its hardware, including the number of CPUs, RAM, and storage/volume, similar to a Virtual machine.
We refer to this service as elastic due to the flexibility it offers when creating EC2 instances or virtual machines.
EC2 is the way that allows doing Iaas(Infrastructure as a service) in AWS.
Purpose of EC2
Businesses primarily utilize EC2 to host applications and make them available to millions of people via the Internet. EC2 is also capable of high-scale, high-performance data processing, and operations, among other things.
While using EC2 you can Customize Hardware according to the workload to run the required.
AWS Charges according to the instance in running state/time and resource provision.
With using EC2 we can easily Start/Stop/Terminate or Replace instace with just some clicks.
The instance is created inside the VPC of your AWS Account with complete control of the in-outbound network.
EC2 sizing & configuration options:
While creating EC2, we have the following options available for configuration:
1)Operating System (Windows, Linux, Mac OS)
2) CPU (Select according to How much compute power & core are needed for your application)
5) Firewall rules (Security Group)
6) Bootstrap Script
Bootstrapping means launching commands when a machine starts.
If you want to run any script on the first launch of the instance you can use bootstrapping.
Using the bootstrap script we can automate something like Installing updates, Installing the software, Downloading some files from the internet, etc...
Types of EC2 Instances
There are different types of EC2 instances that are optimized for different use cases.
Below we mentioned some of the Categorized based on the workload to run on the instance:
The General purpose instances are great for a diversity of workloads such as a web server.
Used during Developing, building, and testing
Example: T2 micro,m4
The Compute Optimized instances can be a good choice for computer-intensive tasks that require high-performance processors.
Used for Batch/Video Processing, Media Transcoding, Scientific Model, ML, High-Performance web server, and dedicated game server as these types of tasks required high-intensive CPU
Example : c5,c6,c7g
The memory-optimized instances are suitable for Fast performance for workloads that process large data sets in memory
Used for DB, cache, and Real-Time Analytics
Example: R5, X1
The storage-optimized instances are good choices for storage-intensive tasks that require high, sequential read and write access to large data sets on local storage.
Used for Transaction Workload and High Network, High-Frequency online transaction processing(OLTP) systems
Example: D3, H1
For more details, https://aws.amazon.com/ec2/instance-types/