You are on page 1of 17

Introduction to AWS EC2

Amazon Elastic Compute Cloud (EC2) is a part


of  Amazon Web Services (AWS), that allows users to
rent virtual computers on which user can run their
own computer applications.

Amazon EC2 is the most used AWS service. It lets users


create virtual machines of their own choice of
configurations.

The word ‘elastic’ in Elastic Compute Cloud talks about


the system’s capability of adapting to varying
workloads and provisioning or de-provisioning
resources according to the demand.
AWS EC2

Features:-

• Auto-scaling e.g. Crash Free Netflix


• Pay-as-you-go e.g. Metered Services (Plug n Play)
• Increased Reliability e.g. support for global business (
20 + regions & 60+ Availability zones)
• Elasticity e.g. Precise control on resources
(OS/DB/Instance/Cost)
AWS EC2 Instances
AWS EC2 Instances
There are several types of AWS instances with different
configurations and benefits.
• General purpose -Balanced/optimized for memory,
computing, storage & networking e.g.

A1 Instances for micro-services, Applications that


require the Arm instruction set.
M5, M5a, and M5d Instances for Web, Gaming &
application servers.
T2/T3 Instances for code repositories.
Instances…..
• Compute optimized - These instances are useful for
compute-dependent applications that need high-
performance processors e.g. -
• Batch processing workloads (BFSI)
• High-performance web servers (HPC) (Telecom/Cyber
Surveillance)
• Scientific modeling (Ocean/Astro/weather)
• Ad serving engines.
Instances….

• Memory optimized – These instances are for


delivering fast performance for processing large data
sets in memory.
• R4, R5, R5a, and R5d instances are memory
optimized e.g. Relational (MySQL) and NoSQL
(MongoDB, Cassandra) databases.
• Applications which process real-time big data sets
(financial services, Hadoop/Spark clusters, etc.)
Instances….
• Accelerated Computing -Accelerated Computing
instance are types of instances which use hardware
accelerators or co-processors which perform some
functions e.g. floating-point number calculation,
graphics processing e.g. Online gaming services.
Instances….
• Storage optimized Instances -These Instances are
designed for workloads that contain very large data
sets which has to be written in memory and require
high, sequential read and write access.
• D2 instances feature up to 48 TB of HDD-based local
storage.
• H1 instances provide a balance between compute and
memory and features up to 16 TB of HDD-based local
storage.
• I3 instances provide Non-Volatile Memory Express
(NVMe) SSD-backed instance storage optimized for low
latency, very high random I/O performance, high-
sequential read throughput.
EC2 Amazon Machine Images (AMIs)

Instances in AWS are basically virtual environments, having


following features:-
• Instances consist of Amazon Machine Images(AMI) which are pre-
configured templates that wraps everything you need for your
server including the operating system, Patches & Application.
• Multiple options for configuring your instance memory, CPU,
storage and networking, making various Instance Types available
for you.
• Very secure login as it uses key pairs.
• It provides a storage volume called Instance Store Volumes for
temporarily storing your instance data. These storage volumes are
deleted when the instance stops.
• Provides persistent storage for your data using Amazon Elastic
Block Storage (EBS) Volumes.
EC2
• Provides multiple physical locations for your resources.
These resources could be anything – instances, Amazon EBS
Volumes, etc. This is possible because
of Regions and Availability Zones.
• It provides a firewall that lets you specify ports, protocols,
and source IP range that reaches your instance. This is
configured using the Security Groups.
• By default, the instances you create have dynamic IP. You can
provide your instance with a static IP using Elastic IP
Addresses.
• You can provide metadata for your instances in the form
of Tags FOR Admin(s), developers & testers.
• It lets you configure your network such that its isolated from
the rest of the AWS Cloud using Virtual Private Clouds(VPC).
EC2
An AMI is made up of following core components.
Pointer to the default kernel
AMIs include a pointer to the kernel on which to create an
EC2 instance.
Template for the root volume
The template defines all libraries, application servers, and
applications which the root volume requires.
Block device mapping for attached storage
Defines the Elastic Block Storage (EBS) volumes which are to
be attached to the new EC2 instance.
Launch control permissions
Permissions define the AWS accounts which can use the AMI
to launch new instances. AMIs are stored in AWS S3 after
being compressed and encrypted.
EC2

The four main sources of AMI are :-


Published by AWS with many versions.
The AWS Marketplace
Generated from Existing Instances.
Using raw open source formats (VHD, VMDK)
EC2
EC2

Addressing an Instance
There are FOLLOWING ways that an instance may be addressed over
the web upon creation:
Public Domain Name System (DNS) Name—When you launch an
instance, AWS creates a DNS name that can be used to access the
instance. This DNS name is generated automatically and cannot be
specified by the customer. This DNS name persists only while the
instance is running and cannot be transferred to another instance.
Public IP—A launched instance may also have a public IP address
assigned. This IP address is assigned from the addresses reserved by
AWS (through ISP) and cannot be specified to users. This IP address
is unique on the Internet, persists only while the instance is
running, and cannot be transferred to another instance.
EC2
Elastic IP—An elastic IP address is an address unique on
the Internet that you reserve independently and
associate with an Amazon EC2 instance. While similar
to a public IP, there are some key differences. This IP
address persists until the customer releases it and is
not tied to the lifetime or state of an individual
instance. Because it can be transferred to a
replacement instance in the event of an instance
failure. it is a public address that can be shared
externally without coupling clients to a particular
instance.
EC2
EC2

An "EBS-backed" instance is an EC2 instance which


uses an EBS volume as it’s root device. You can
consider EBS volumes as a kind of Network Attached
Storage.
EBS volumes based instances can easily be backed up
and duplicated. Here AWS will charges you for EBS as
well.
An "instance store" instance is an EC2 instance whose
root device resides on the virtual machine’s hard
drive.
Instance store volumes are cost effective and local so
they are faster.

You might also like