EC2: Elastic Compute Cloud

EC2: Elastic Compute Cloud

10 mins read3.5K Views Comment
clickHere
Updated on Oct 23, 2023 17:24 IST

In the AWS Cloud, an instance is a virtual server. You can set up and configure the operating system and applications that run on your instance using Amazon EC2. When you sign up for AWS, you can use the AWS Free Tier to get started with Amazon EC2.

2022_02_7.jpg

Amazon EC2 (Elastic Compute Cloud) is a web service interface that allows businesses to run application programs in the public cloud of Amazon Web Services (AWS). It is intended to make web-scale computing more accessible to developers.  

Amazon EC2 cuts the time it takes to obtain and boot new server instances down to minutes, allowing you to quickly scale capacity up and down as your computing needs change. These instances can be launched in one or more geographical locations or regions, and they can be launched in one or more Availability Zones (AZs).  

Each region is made up of several AZs in different locations that are linked by low-latency networks in the same region. This interface allows you to launch as many or as few virtual servers as you require, configure security and networking, and manage storage. 

Table of Content

  1. Features of EC2 
  2. EC2 instance types
  3. How to create an EC2 instance? 
  4. AWS EC2 price models
  5. Difference between EC2 and S3 
  6. Advantages/Benefits of EC2 
  7. Disadvantages/Drawbacks of EC2 

Features of EC2

Amazon EC2 provides various features, such as reliability, security, flexibility, etc. Apart from these features, some of the other features are discussed below: 

  1. Provides a highly reliable environment in which instances can be replaced quickly 
  2. Consists of virtual computing environments, known as instances 
  3. Provides pre-configured templates for your instances 
  4. Works well with Amazon services such as Amazon S3, Amazon SQS, and so on  
  5. Provides secure login information for your instances by utilizing key pairs 
  6. Works in Amazon Virtual Private Cloud to provide resources with a secure and robust network 
  7. Provides storage volumes for temporary data that are deleted when you stop, hibernate, or terminate your instance, known as instance store volumes 
  8. Provides developers and system administrators with the tools they need to build failure applications and isolate themselves from common failure scenarios 
  9. Allows to pay only for the resources that you have used

EC2 instance types:

There are five types of EC2 instances, and each of those instances is described below:

General Purpose

If you’re not sure what type to use, these general-purpose AWS EC2 instance types are a good place to start. Because this type of instance provides a balance of computing, memory, and networking resources. There are three general-purpose instances of family types:

  • t instance family (t stands for tiny or turbo.)
  • m instance family (m stands for happy medium or main choice)
  • a1 instance family (al stands for Arm processor)

Compute Optimized

Compute Optimized instances are ideal for compute-intensive applications that benefit from powerful processors. EBS is optimized by default in this case. There is one compute-optimized instance family type:

  • c instance family (c stands for compute)

Memory Optimized

Memory-optimized instances are intended to provide fast performance for workloads that process large data sets in memory. There are four memory-optimized instance family types:

  • r instance family (r stands for RAM)
  • x1 instance family (x stands for xtreme)
  • High Memory instance family (High memory can describe itself…)
  • z1d instance family (z stands for zippy)

Accelerated Computing

Accelerated computing instances make use of hardware accelerators to carry out activities like graphics processing or data pattern matching more proficiently. There are four accelerated computing instance family types:

  • p instance family (p stands for pictures)
  • infl instance family (inf stands for inference)
  • g instance family (g stands for graphics )
  • fl instance family (f stands for FPGA)

Storage Optimized

Storage-optimized instances are intended for storage-intensive tasks that involve frequent sequential read and write access to large datasets on local storage. There are three storage optimized instance family types:

  • i3 instance family (i stands for IOPS)
  • d2 instance family (d stands for dense)
  • h1 instance family (f stands for HDD)

Let’s look at the data represented in the form of a tabular format to understand the differences between EC2 instances types:

Benchmark General Purpose Compute Optimized Memory Optimized Accelerated Computing Storage Optimized
Ideal for Applications like web servers and code repositories that use these resources in equal quantity. Compute-intensive applications that require high-performance processors. Providing quick performance for workloads that process large data sets in memory. Performing tasks such as graphics processing and machine learning training. Performing storage-intensive tasks.
Use cases Developing
Building
Testing
High-performance computing
Gaming
Video encoding
In-memory caches
Real-time big data analytics
Open-source databases
Computational fluid dynamics
Seismic analysis
Drug discovery
Distributed File Systems
Cache for in-memory databases
Data Warehousing applications
No. of instance family type Three One Four Four Three

Also explore: Cloud Computing Online Courses & Certifications

How to create an EC2 instance? 

Creating EC2 is very simple. There are a few steps that need to be completed to use EC2. If you are new to this and you just want to get hands-on experience, then it’s better to use free resources. These steps are: 

  1. Login to your AWS account and click on the Services option, placed at the top left corner. 
  2. A drop-down menu will appear. Under the Compute category, click EC2. The EC2 dashboard will open. 
  3. In the EC2 dashboard window, in the right pane, under the Launch Instance section, click the Launch Instance button.  
  4. At Step 1: Choose an Amazon Machine Image (AMI). Step: select an operating system that you want to use.  
  5. At Step 2: Choose an Instance Type step, select an instance that you want to use by clicking on the radio button in front of it. Then click on the Next: Configure Instance Details button. 
  6. At Step 3: Configure Instance Details step, review the settings, and then click on the Next: Add Storage button. In this step, you can edit the default settings as per the requirement. For example, you can increase the number of instances that will launch. 
  7. At Step 4: Add Storage step, review the settings, and then click on the Next: Add Tags button. In this step, you can edit the default settings as per the requirement. For example, you can change the size of the free space available.  
  8. At Step 5: Add Tags step, review the settings, or add a new tag as per the requirement. To add a new tag, click on the Add Tag button to easily identify your application. Once the tag has been added, click on the Next: Configure Security Group button. 
  9. At Step 6: Configure Security Group step, review the setting, or change it as per the requirement. If you want to add a rule, click on the Add Rule button and then fill in the details such as Type, Protocol, Port Range, and so on. Once the changes have been made as per the requirement, click on the Review and Launch button. 
  10. At Step 7: Review and Launch step, review all the settings and then click the Launch button. The Select an existing key pair or create a new key pair window will open.
  11. In this window, from the drop-down list select Create a new key pair, and in the Key pair name box, type the name that you want to give. For example, Instance_key_pair.
  12. Click the Download Key Pair button. Once it is downloaded, scroll down the Select an existing key pair or create a new key pair window and click the Launch Instances button.
  13. Wait for 2-3 minutes for the instances to launch. Once they are launched you will receive a notification.

Explore Free Online Courses with Certificates

 

AWS EC2 price models

The three pricing structures for Amazon EC2 instances are:

  1. On-Demand Instances
  2. Reserved Instances
  3. Spot Instances

All these four pricing models are described in the table given below:

Benchmark On-Demand Reserved Spot
Payment Pay-as-you-go Per hour/per month Depends upon instance type and region, basically
Upfront commitment No Yes No
Advantages There is no commitment to a term or an annual budget 
There are no upfront charges.
You’ll be able to shut down the instance when you’re done with it.
Best for customers that are willing to commit for a period of one to three years
Cheaper as compared to the on-demand instance.
Using programs that have a range of start and finish periods.
Disadvantages High cost as compared to other pricing models. Instances that have been reserved are commonly unused. There is no predictable pricing structure because prices fluctuate according to supply and demand.

Difference between EC2 and S3 

Amazon EC2

It’s just a usual computer hosted on one of AWS’s datacenters. EC2 is designed to host your application on a server, which will then serve the contents via S3 and RDS, respectively. As a result, Amazon EC2 is suitable for any type of processing activity.

Amazon S3

Take an e.g. of any OTT platform (Netflix, Hotstar, Amazon Prime, and so on) that stores millions of video files that power their content. There have to be those video files and multiple versions of those stored somewhere. That’s where S3 comes into play. Amazon S3 is an AWS storage platform.

For better understanding let’s look at the differences in a tabular format:

Benchmark Amazon EC2 Amazon S3
Best for Processing activity Storing activity
Storing duration Short-term Long-term

Advantages/Benefits of EC2 

The advantages/benefits of EC2 are listed below:

Reliability

Amazon EC2 provides 99.9% availability in each Amazon EC2 region. The services are highly dependable, and instances can be easily and quickly replaced.

Safety

Amazon collaborates with Amazon VPC to provide secure networking and compute resources. The compute instances are housed in a VPC (Virtual Private Cloud) and are assigned an IP address range. This function assists the user in determining which instances are exposed to the internet and which are kept private.

Adaptability

You can choose from a variety of instance types, software packages, instance storage, and operating systems on EC2. EC2 allows us to specify the memory, CPU, and boot partition size that is best for the operating system and application.

Check Out the Best Online Courses

Cost-cutting

EC2 is inexpensive because it allows the user to choose plans based on their needs. This will allow the user to save money and make the best use of the available resources. EC2 reaps the benefits of Amazon’s scale by charging a very low fee in comparison to the services provided.

Full-Service Computing Solution

Amazon RDS, S3, Dynamo DB, and Amazon SQS are all compatible with EC2. This provides an all-in-one computing, processing, and storage solution.

Elastic Web-Scale Computing

Enterprises can quickly increase or decrease capacity. They can launch thousands of server instances at the same time. Furthermore, all server instances are managed by web service APIs, which can scale the servers up and down based on the needs.

Disadvantages/Drawbacks of EC2 

  • When you migrate to the cloud, Amazon Web Services may encounter some common cloud computing issues like downtime, limited control, and backup protection.
  • AWS imposes resource limits by default, which vary by region. You can only launch a certain number of instances per area.
  • Hardware-level changes occur in your application, which may result in poor performance and usage of your applications.
  • Security Constraints: Because security is one of the most important features, AWS restricts some of its features that cannot be changed at all.

Conclusion

In today’s article, we went over the EC2 interface provided by Amazon Web Services in great detail. I hope that by writing this article, I was able to dispel some of your concerns.

If you are looking for a comprehensive course in Cloud Computing, then these cloud courses may be useful. This program assists interested students who want to become full-fledged Cloud professionals.

Top Trending Tech Articles:
Career Opportunities after BTech | Online Python Compiler | What is Coding | Queue Data Structure | Top Programming Language | Trending DevOps Tools | Highest Paid IT Jobs | Most In Demand IT Skills | Networking Interview Questions | Features of Java | Basic Linux Commands | Amazon Interview Questions

Recently completed any professional course/certification from the market? Tell us what liked or disliked in the course for more curated content.

Click here to submit its review with Shiksha Online.

 

FAQs

Can EC2 instances be accessed remotely?

Yes, EC2 instances can be accessed remotely using secure shell (SSH) for Linux instances or remote desktop protocol (RDP) for Windows instances. Users can connect to instances over the internet using the appropriate credentials and access the instance's operating system and applications.

How can EC2 instances be managed?

EC2 instances can be managed through the AWS Management Console, Command Line Interface (CLI), or SDKs provided by AWS. Users can perform tasks such as launching instances, configuring networking, managing storage, monitoring performance, and automating deployments using these management tools.

How are EC2 instances billed?

EC2 instances are billed based on the instance type, duration of usage, and any additional services or resources utilized. There are various pricing options available, including On-Demand instances, which are billed per hour or per second, Reserved instances for long-term commitments, and Spot instances for bidding on spare computing capacity at a lower price.

About the Author

This is a collection of insightful articles from domain experts in the fields of Cloud Computing, DevOps, AWS, Data Science, Machine Learning, AI, and Natural Language Processing. The range of topics caters to upski... Read Full Bio

Comments