Exploring The Components of AWS
Exploring The Components of AWS
COMPONENTS OF
AWS
INTRODUCTION
• Amazon Web Services (AWS) is a comprehensive,
evolving cloud computing platform provided by
Amazon. It provides a mix of infrastructure as a
service (IaaS), platform as a service (PaaS) and
packaged software as a service (SaaS) offerings.
• AWS launched in 2006 from the internal infrastructure
that Amazon.com built to handle its online retail
operations. AWS was one of the first companies to
introduce a pay-as-you-go cloud computing model
that scales to provide users with compute, storage or
throughput as needed.
• Amazon Web Services provides services from dozens
of data centers spread across availability zones(AZs)
in regions across the world. An AZ represents a
location that typically contains multiple physical data
centers, while a region is a collection of AZs in
geographic proximity connected by low-latency
network links. An AWS customer can spin up virtual
machines (VMs) and replicate data in different AZs to
achieve a highly reliable infrastructure that is resistant
to failures of individual servers or an entire data
center.
ELASTIC CLOUD COMPUTE
• Amazon Elastic Compute Cloud (EC2) forms a
central part of Amazon.com’s cloud-
computing platform, AWS, by allowing users to
rent virtual computers on which they run their own
computer applications. EC2 encourages scalable
deployment of applications by providing a web
service through which a user can boot an Amazon
Machine Image (AMI) to configure a virtual machine,
which Amazon calls an "instance", containing any
software desired. A user can create, launch, and
terminate server-instances as needed, paying by the
second for active servers. EC2 provides users with
control over the geographical location of instances that
allows for latency optimization and high levels
Initially, EC2 used Xen virtualization exclusively. However, on
November 6, 2017, Amazon announced the new C5 family of
instances that were based on a custom architecture around
the KVM hypervisor, called Nitro. Each virtual machine, called
an "instance", functions as a virtual private server. Amazon
sizes instances based on "Elastic Compute Units". The
performance of otherwise identical virtual machines may
vary. On November 28, 2017, AWS announced a bare-metal
instance type offering marking a remarkable departure from
exclusively offering virtualized instance types.
As of January 2019, the following instance types were offered:
•General Purpose: A1, T3, T2, M5, M5a, M4, T3a
•Compute Optimized: C5, C5n, C4
•Memory Optimized: R5, R5a, R4, X1e, X1, High Memory, z1d
•Accelerated Computing: P3, P2, G3, F1
•Storage Optimized: H1, I3, D2
As of April 2018, the following paying method for instance
were offered:
•On-demand: pay by the hour without commitment.
•Reserved: rent instances with one-time payment receiving
discounts on the hourly charge.
•Spot: bid-based service: runs the jobs only if the spot price is
below the bid specified by bidder.
AWS EC2 Instance Types:
General Purpose
T2
Burstable Performance Instances that offer a baseline level of
CPU performance with the capability to burst above the
baseline. The ability to burst and baseline performance are
directed by CPU Credits. Every T2 instance regularly gets CPU
Credits at an established rate that is based on the size of the
instance. These instances accumulate CPU Credits as and when
they become idle, and utilize the CPU credits as and when they
become active. These instances are a better option for workloads
that do not require the full CPU consistently but rarely requires
bursting. These instances are suitable for general purpose
workloads like developer environments, small databases, and
M3
The M3 instance type offers a balance of memory, network, and
compute resources. These instances are for general purpose
virtual machines, and most of the EC2 instances belong to this
category.
M3 instances are suitable for mid-size and small databases, data
processing jobs that require extra memory, running backend
servers for SAP, cluster computing, Microsoft SharePoint, and
several other applications.
M4
M4 instances are the most recent general-purpose instances.
The M4 family of instances offers a balance of memory,
network, and compute resources, and it is a better option for
several applications. They have custom Intel Xeon E5-2676 v3
Haswell processors that are optimized explicitly for EC2. The
clock rate for these instances can be in the range of 2.4 GHz to
3.0 GHz with the aid of Intel Turbo Boost.
M4 instances also provide Enhanced Networking that gives up
to four times the packet rate of instances without Enhanced
Networking, while guaranteeing reliable latency, even under
high network I/O. By default, these instances are EBS-
Optimized and have a devoted network capacity for
Input/Output operations.
Compute-optimized instances
C4
Feature maximum performance processors with the lowest price
performance in EC2 Instance types. These instances are suitable
for compute-bound applications that derive advantage
from high-performance processors. C4 instances are ideal for
media transcoding, Massively Multiplayer gaming servers, high
traffic web servers, batch processing workloads, and high-
performance computing.
C4 instances are dependent on custom 2.9 GHz Intel Xeon E5-
2666 v3 processors, which are specifically optimized for EC2.
The Intel Turbo Boost Technology helps clock speed of the C4
instances to touch 3.5Ghz with 1 or 2 core Turbo Boost
onc4.8xlarge instances.
C3
When compared to C1, C3 instances offer much faster
processors with about twice the memory per SSD-based and
vCPU instance storage. These instances are suitable for
applications that derive advantage from a large amount of
compute capacity for memory and are best-fitted for high
performing web servers, and several compute-intensive
applications.
Compute-optimized instances are a recent introduction from
AWS. The instances are intended to provide maximum
performance at an affordable price. They have per-core
performance, which beats those offered by any of the AWS EC2
instance types, with a price-performance ratio that would be the
best fit for compute-intensive workloads.
Memory Optimized
X1
Best suited for enterprise-class, large-scale, in-memory
applications and offer the lowest price for each GiB of
RAM among AWS EC2 instance types. These instances provide
1,952 GiB of DDR4 based memory. Compared to other Amazon
EC2 instances, these offer the lowest price for each GiB of
RAM and are best suited for executing in-memory databases such
as SAP HANA, other big data processing engines such as Presto or
Apache Spark, and HPC (High-Performance Computing)
applications. These instances are SAP certified for running
production environments of the next-generation Business Suite on
HANA (SoH), Business Suite S/4HANA, Business Warehouse on
HANA (BW), and Data Mart Solutions on HANA on the AWS
R3
R3 instances are well-equipped for running on memory-intensive
applications and are less expensive for each GiB of RAM. These
instances offer greater I/O performance, constant memory
bandwidth, support for reduced latency, lower jitter, and
maximum packet per second performance and support for EBS
optimization. They are suitable for applications that require
maximum memory performance with a high price point for each
GB of RAM.
These instances are best suited for in-memory analytics and
high-performance databases, including NoSQL databases and
relational databases like MemcacheD/Redis and MongoDB
applications. These instances support HVM (Hardware
Virtualization) Amazon Machine Images only.
GPU
G2 instances are well-suited for general purpose and graphics
GPU compute applications. They belong to a GPU-powered family
and offer molecular modeling, machine learning, rendering,
transcoding jobs, and game streaming, which require enormous
amounts of similar processing power. These instances provide a
high performing NVIDIA GPU with 4GB of video memory and
1,536 CUDA cores, which makes them suitable for 3D
visualizations, video creation services, and graphics-intensive
applications. The NVIDIA GRID GPU contains committed,
hardware-accelerated video encoding that produces H.264 video
stream, which may be displayed on any device with a well-suited
video codec. These instances are suitable for 3D application
streaming and other GPU compute workloads.
Storage Optimized
I2
High storage instances that offer fast SSD-backed instance
storage, which is best for high random I/O performance and
provide maximum IOPS at the lowest cost. The primary data
storage in such instances is SSD-based instance storage. As with
all other instance storage, these volumes continue for the life of
the instance. When terminating and stopping an instance, the
applications, as well as the data that is stored in the instance
store, are wiped out. It is recommended to make back-ups at
regular intervals or replicate the data that has been stored in the
instance storage. The user can activate the TRIM command to
notify the SSD controller when the data is no longer required. This
offers the controller much more available free space that could
decrease write amplification while increasing performance.
Dense-storage Instances
D2
Offer up to 48 TB of HDD-based storage, providing huge disk
throughput and offering the lowest price for each disk throughput
performance on AWS EC2. D2 instances are intended for
workloads that need greater sequential write and read access to
larger data sets on local storage. Best-suited for MPP data
warehouses, Hadoop, MapReduce distributed computing, and data
or log processing computing. By default, these instances are EBS-
optimized and offer a dedicated block storage throughput for AWS
EBS, which ranges from 750 Mbps up to 4,000 Mbps free of
charge. Allows you to regularly achieve maximum performance for
EBS volumes by reducing contention among network traffic and
Amazon EBS I/O from the D2 instance.
INSTANCE LIFECYCLE
•Pending
• When the instance is first launched it enters into
the pending state.
•Running
• After the instance is launched, it enters into
the running state.
• Charges are incurred for every hour or partial
hour the instance is running even if it is idle.
•Start & Stop (EBS-backed instances only)
• Only an EBS-backed instance can be stopped and
started. Instance store-bakced instance cannot be
stopped and started.
• An instance can be stopped & started in case the
instance fails a status check or is not running as
expected.
• Stop
• After the instance is stopped, it enters in stopping
state and then to stopped state.
• Charges are only incurred for the EBS storage and
not for the instance hourly charge or data transfer.
• While the instance is stopped, you can treat its
root volume like any other volume, and modify it.
• Volume can be detached from the
stopped instance, and attached to a running
instance, modified, detached from the running
instance, and then reattached to the stopped
instance. It should be reattached using the
storage device name that’s specified as the root
device in the block device mapping for the
• Start
• When the instance is started, it enters into pending
state and then into running
• An instance when stopped and started is launched
on a new host
• Any data on an instance store volume (not root
volume) would be lost while data on the EBS
volume persists
• EC2 instance retains its private IP address as well as
the Elastic IP address. However, the public IP address,
if assigned instead of the Elastic IP address, would be
released
• Charges for full hour are incurred for every transition
from stopped to running, even if the transition is
•Instance reboot
• Both EBS-backed and Instance store-backed
instances can be rebooted
• An instance retains it public DNS, public and
private IP address during the reboot
• Data on the EBS and Instance store volume is also
retained
• Amazon recommends to use Amazon EC2 to
reboot the instance instead of running
the operating system reboot command from your
instance as it performs a hard reboot if the
instance does not cleanly shutdown within four
minutes also creates an API record in CloudTrail, if
enabled.
Instance retirement
• An instance is scheduled to be retired when AWS
detects irreparable failure of the underlying
hardware hosting the instance.
• When an instance reaches its scheduled retirement
date, it is stopped or terminated by AWS.
• If the instance root device is an Amazon EBS volume,
the instance is stopped, and can be started again at
any time.
• If the instance root device is an instance store
volume, the instance is terminated, and cannot be
used again.
•Instance Termination
• An instance can be terminated, and it enters into the
shutting-down and then the terminated state
• After an instance is terminated, it can’t be
connected and no charges are incurred
• Instance Shutdown behaviour
• EBS-backed
instance supports InstanceInitiatedShutdownB
ehavior attribute which determines whether the
instance would be stopped or terminated when a
shutdown command is initiated from the instance
itself.
• Default behaviour for the the instance to be
stopped.
• Termination protection
• Termination protection (DisableApiTermination
attribute) can be enabled on the instance to
prevent it from being accidently terminated
• DisableApiTerminationfrom the Console, CLI or API.
• Instance can be terminated through Amazon EC2
CLI.
• Termination protection does not work for instances
when
• part of an Autoscaling group
• launched as Spot instances
• terminating an instance by initiating shutdown
from the instance
• Data persistence
• EBS volume have a DeleteOnTermination attribute
which determines whether the volumes would be
persisted or deleted when an instance they are
associated with are terminated
• Data on Instance store volume data does not
persist
• Data on EBS root volumes, have
the DeleteOnTermination flag set to true, would be
deleted by default
• Additional EBS volumes attached have
the DeleteOnTermination flag set to false are not
deleted but just dettached from the instance.
AMAZON S3
Amazon Simple Storage Service (Amazon S3) is a
scalable, high-speed, web-based cloud storage service
designed for online backup and archiving of data
and applications on Amazon Web Services. Amazon S3
was designed with a minimal feature set and created to
make web-scale computing easier for developers.
Amazon S3 is an object storage service, which differs
from block and file cloud storage. Each object is stored
as a file with its metadata included and is given an ID
number. Applications use this ID number to access an
object. Unlike file and block cloud storage, a developer
can access an object via a REST API.
Amazon S3 manages data with an object
storage architecture which aims to provide scalability, high
availability, and low latency with 99.999999999% (11 9's)
durability and between 99.95% to 99.99% availability. The basic
storage units of Amazon S3 are objects which are organized into
buckets. Each object is identified by a unique, user-assigned
key. Buckets can be managed using either the console provided
by Amazon S3, programmatically using the AWS SDK, or with the
Amazon S3 REST API. Objects can be managed using the AWS
SDK or with the Amazon S3 REST API and can be up to
five terabytes in size with two kilobytes of metadata. Additionally,
objects can be downloaded using the HTTP GET interface and
the BitTorrent protocol.
The S3 cloud storage service gives a subscriber access
to the same systems that Amazon uses to run its own
websites. S3 enables customers to upload, store and
download practically any file or object that is up to five
terabytes (TB) in size, with the largest single upload
capped at five gigabytes (GB).
Advantages
Amazon S3 is intentionally built with a minimal feature set that
focuses on simplicity and robustness. Following are some of
advantages of the Amazon S3 service:
•Create Buckets – Create and name a bucket that stores
data. Buckets are the fundamental container in Amazon S3 for
data storage.
•Store data in Buckets – Store an infinite amount of data in a
bucket. Upload as many objects as you like into an Amazon
S3 bucket. Each object can contain up to 5 TB of data. Each
object is stored and retrieved using a unique developer-
assigned key.
•Download data – Download your data or enable others to do
so. Download your data any time you like or allow others to do
the same.
•Permissions – Grant or deny access to others who want to
upload or download data into your Amazon S3 bucket. Grant
upload and download permissions to three types of users.
Authentication mechanisms can help keep data secure from
unauthorized access.
•Standard interfaces – Use standards-based REST and
SOAP interfaces designed to work with any Internet-
development toolkit.
Requests are authorized using an access control list associated
with each object bucket and support versioning which is
disabled by default. Bucket names and keys are chosen so that
objects are addressable using HTTP URLs:
∙ http://s3.amazonaws.com/bucket/key
∙ http://bucket.s3.amazonaws.com/key
∙ http://bucket/key (where bucket is a DNS CNAME
record pointing to bucket.s3.amazonaws.com)
S3 can be used to replace significant existing web-hosting infra
with HTTP client accessible objects. The AWS authentication
mechanism allows the bucket owner to create an authenticated
URL with valid for a specified amount of time.
AMAZON GLACIER VS S3
Lifecycle rules within S3 allow you to manage the life cycle of
the objects stored on S3. After a set period of time, you can
either have your objects automatically delete or archived off to
Amazon Glacier. Amazon Glacier is marketed by AWS as
“extremely low cost storage”. The cost per Terrabyte of storage
and month is again only a fraction of the cost of S3. Amazon
Glacier is pretty much designed as a write once and retrieves
never (or rather rarely) service. This is reflected in the pricing,
where extensive restores come at a additional cost and the
restore of objects require lead times of up to 5 hours.
Let me highlight the difference between the ‘pure’ Amazon
Glacier service and the Glacier storage class within Amazon S3.
S3 objects that have been moved to Glacier storage using S3
Lifecycle policies can only be accessed (or shall I say restored)
using the S3 API endpoints. As such they are still managed as
objects within S3buckets, instead of Archives within Vaults,
which is the Glacier terminology. This differentiation is important
when you look at the costs of the services. While Amazon
Glacier is much cheaper than S3 on storage, charges are
approximately ten times higher for archive and restore requests.
This is re-iterating the store once, retrieve seldom pattern.
Amazon also reserves 32KB for metadata per Archive within
Glazier, instead of 8 KB per Object in S3, both of which are
charged back to the user. This is important to keep in mind for
your backup strategy, particularly if you are storing a large
number of small files. If those files are unlikely to require
restoring in the short term it may be more cost effective to
combine them into an archive and store them directly within
Amazon Glazier.
ELASTIC BLOCK
STORAGE
INTRODUCTION
● Amazon EBS is like a hard drive in the cloud that provides
persistent block storage volumes for use with Amazon EC2
instances.
● These are previous generation magnetic drives that are suited for
workloads where data is accessed infrequently.
● Their size can be up to 1 TiB and on average they provide a throughput
of 100 MB/s.
● These can be used as root volumes for EC2 instances.
AMAZON VIRTUAL
PRIVATE CLOUD
AMAZON VIRTUAL PRIVATE CLOUD
● Amazon Virtual Private Cloud (VPC) allows the users to use AWS
resources in a virtual network.
● The users can customize their virtual networking environment as they
like, such as selecting own IP address range, creating subnets.etc.
● When you create a VPC, you must specify a range of IPv4 addresses for
the VPC in the form of a CIDR block; for example, 10.0.0.0/16.
● Amazon VPC supports IPv4 and IPv6 addressing, and has different
CIDR block size limits for each. By default, all VPCs and subnets must
have IPv4 CIDR blocks
AMAZON VIRTUAL PRIVATE CLOUD
● Many connectivity options − There are various connectivity options
that exist in Amazon VPC. EG: Connect VPC directly to the Internet
via public subnets..
● Easy to use − Ease of creating a VPC in very simple steps by selecting
network setups as per requirement.
● Easy to backup data − Periodically backup data from the datacenter
into Amazon EC2 instances by using Amazon EBS volumes.
● Easy to extend network using Cloud − Move applications, launch
additional web servers and increase storage capacity by connecting it to
a VPC.
● A virtual private cloud (VPC) with a size /16 IPv4 CIDR block (example:
10.0.0.0/16). This provides 65,536 private IPv4 addresses.
● An Internet gateway. This connects the VPC to the Internet and to other AWS
services.
● An instance with a private IPv4 address in the subnet range (example:
10.0.0.6), which enables the instance to communicate with other instances in
the VPC, and an Elastic IPv4 address (example: 198.51.100.2), which is a
public IPv4 address that enables the instance to be reached from the Internet.
● A custom route table associated with the subnet. The route table entries
enable instances in the subnet to use IPv4 to communicate with other
instances in the VPC, and to communicate directly over the Internet. A subnet
that's associated with a route table that has a route to an Internet gateway is
known as a public subnet.
SUBNETS
Subnets
● A subnet is a segment of an Amazon VPC’s IP address where you can
launch Amazon EC2 instances, Amazon relational database
service(RDA) and other AWS services.
● CIDR blocks define subnets.(Eg: 192.168.0.0/24)
● The smallest subnet that you can create is /28(16 IP addresses)
● Amazon reserves the first 4 and the last IP address for internal
networking purposes.
● For eg: a subnet defined as /28 has 16 IP addresses, subtracting 5 to be
used by amazon to yield 11 IP addresses left for the user.
● Can be classified as- public, private or VPN only.
Subnets
● Public Subnet: Associated route table directs the subnet’s traffic to