A Brief About Amazon EC2

Raghav Agarwal
4 min readJul 2, 2020

Amazon EC2( Elastic Compute Cloud ) is an infrastructure cloud computing service that provides scalable computing capacity in the cloud and eliminates your need to invest in hardware upfront, So you can develop and deploy applications faster.

Why Amazon Ec2?

Now that we know what is EC2 in AWS, Now we look forward and understand why we need EC2 and what are the benefits of using Amazon EC2.

  1. Auto-Scaling: Amazon Ec2 enables you to provide resources according to the demand. They either scale up or scale down corresponding to the increase or decrease in demand.
  2. Reliability: Aws spread across multiple regions and has 76 availability zones which make ec2 a more reliable and fault tolerance setup.
  3. Pay as Per go: You will be charged as per hour or as per sec depending upon your use you have to pay only that amount. If you use the Linux server for 1 Hour 10 sec, then you have to pay only for 1 Hour 10 sec.
  4. Elasticity: Instead of buying a 5–10 low configuration machine you can rent one High configuration machine as per your application requirements.

Types of Ec2 Instances

Aws Ec2 instances categorized into a different category:

  1. General Purpose
  2. Compute Optimized
  3. Memory-Optimized
  4. Accelerated Computing/ GPU
  5. Storage Optimized
  6. High Memory

General Purpose:

General Purpose instance provides a balance of computing, memory, and networking that can be used for a variety of workloads. These instances are available in four sizes.

  • Nano, Small, Medium, Large

There are 3 series available in general purpose:

  • A (Medium, Large)
  • M (Large)
  • T (All Sizes)

Compute Optimized:

Compute-optimized instances are ideal for the compute-bound application that benefits from a high-performance processor. Compute Optimized also ideal for batch processing.

Here only 1 series available in Compute Optimized.

  • C

Memory-Optimized:

Ideal for delivering fast performance for the workload that process large datasets in memory.

These instances can be used in these following applications:

  • Applications which process real-time big data sets (financial services, Hadoop/Spark clusters, etc.)
  • High-performance, relational (MySQL) and NoSQL (MongoDB, Cassandra, etc.) databases.

There are 3 series available in Memory-Optimized:

  • R
  • X
  • Z

Storage Optimized

Ideal for workloads that require high, sequential read and write access to very large datasets on local storage.

There are 3 series available in Storage Optimized:

  • I
  • D
  • H

Accelerated Computed Cloud/GPU

Ideal for graphics processing, data pattern matching, gaming, AI/ML/DL.

There are 3 series available in Memory-Optimized:

  • P
  • G
  • F

High Memory

Recently Aws started High Memory instances which can provide you 6,9,12,18 TB of ram support. This instance ideal for run large in-memory databases including production developments of SAP HANA in the cloud.

There are only 1 series available in High Memory:

  • U

EC2 Purchasing Options:

Aws provides different types of purchasing options as per your need and requirements:

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

On-Demand Instances

  • Pay for what you use (Pay, by the second)
  • No upfront payment
  • No long term commitment
  • Recommended for short-term and un-interrupted workloads, where you can’t predict how the application will behave.

Reserved Instances

  • Up to 75% discount compared to On-demand
  • Pay upfront for what you use with a long term commitment
  • Reservation period can be 1 or 3 years

Scheduled Reserved Instances (Scheduled Instances)

  • When you require a fraction of day/week/month
  • Pay for the time that the instances are scheduled
  • Recommended for an application that runs during business hours or for batch processing that runs at the end of the week

Spot Instances

  • Request unused EC2 instances, which can reduce your Amazon EC2 costs significantly.
  • Can get a discount of up to 90% compared to On-demand
  • You bid a price and get the instance as long as its under the price
  • Price varies based on offer and demand
  • Spot instances are reclaimed with a 2-minute notification warning when the spot price goes above your bid
  • Recommended for batch jobs, Big Data analysis, or workloads that are resilient to failures.
  • Not recommended for critical jobs or databases

Dedicated Hosts (Reserved Instances)

  • Physical server with EC2 instance capacity fully dedicated to your use
  • Visibility and control over how instances are placed on the server
  • More expensive
  • Useful for companies that have strong regulatory or compliance needs.

Dedicated Instances

  • Pay, by the hour, for instances that run on single-tenant hardware.
  • Instances running on hardware that’s dedicated to you
  • May share hardware with other instances in the same account.

EC2 Storage Types:

  1. Instance Stored Backed EC2 Instance.
  2. EBS Backed EC2 Instance.

Instance Stored Backed EC2 Instance.

  • Local to the instance
  • No Persistent Datastore
  • No snapshot support

EBS Backed EC2 Instance

  • Persistent Block storage volumes
  • 99.9% availability.
  • Snapshot Support

Happy learning and follow this docs for more information.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html

--

--