0% found this document useful (0 votes)
86 views23 pages

Module 3 - AWS EC2

The document discusses Amazon Elastic Compute Cloud (EC2). It provides an overview of EC2, including what EC2 is, its benefits and features, how to access EC2, purchasing options, Amazon Machine Images, creating AMIs, instance types, resizing instances, the instance lifecycle, rebooting, stopping and terminating instances, Elastic IPs, and Elastic Network Interfaces. It also covers understanding EC2 billing and pricing models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views23 pages

Module 3 - AWS EC2

The document discusses Amazon Elastic Compute Cloud (EC2). It provides an overview of EC2, including what EC2 is, its benefits and features, how to access EC2, purchasing options, Amazon Machine Images, creating AMIs, instance types, resizing instances, the instance lifecycle, rebooting, stopping and terminating instances, Elastic IPs, and Elastic Network Interfaces. It also covers understanding EC2 billing and pricing models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Module - 3

Elastic Cloud Compute (EC2)

2
Agenda
 What is EC2
 EC2 Benefits
 EC2 Features
 How to access EC2
 EC2 Purchasing Options
 EC2 Amazon Machine Images
 EC2 Creating AMI
 EC2 Instance Types
 EC2 Resizing
 EC2 Instance Lifecycle
 EC2 Reboot, Stop, and Terminate
 EC2 Instance Termination
 Elastic IP
 Elastic Network Interfaces
 EC2 Understanding EC2 Billing
 EC2 Per Second Billing
 EC2 Pricing
 EC2 Limitation
 Hands-On Lab
What is EC2

 Amazon Elastic Compute Cloud (Amazon EC2) provides scalable


computing capacity in the Amazon Web Services (AWS) cloud.

 It provides you with complete control of your computing resources and


lets you run on Amazon’s proven computing environment.

 Amazon EC2 reduces the time required to obtain and boot new server
Amazon
instances (EC2 instances) to minutes.
EC2

 Amazon EC2 changes the economics of computing by allowing you to pay


only for capacity that you actually use.
AWS EC2: Benefits

Elastic Flexible
Completely Controlled Integrated
Web-Scale Computing Cloud Hosting Services

Reliable Secure Inexpensive


AWS EC2: Features

Instance Key Instance


Instances AMI EBS Volumes
Types Pair Store

Regions
Security
VPC EIP Tags &
Group
AZs
AWS EC2: How to access EC2

Web-based User Interface

Command Line Interface (CLI)

Windows PowerShell
AWS EC2: Purchasing Options

On-Demand Reserved Dedicated


Spot Dedicated
Instances Instances Instance
Instances Hosts

Purchase at
significant discount
(up to 75%).
Physical host is fully
Highest bidder uses dedicated to run
Instances are Pay, by the
instance at a your instances.
always available hour, for
significant discount
Pay by the hour (up to 90%) instances that Bring your per-
run on single tenant socket, per-core, or
Spot blocks hardware per- VM software
supported licenses to reduce
cost.

1-year to 3
year terms
AWS EC2: Amazon Machine Images
 An Amazon Machine Image (AMI) provides the
information required to launch an instance.

 An AMI includes the following:


o A template for the root volume for the instance (for
example, an operating system, an application server,
and applications)
o Launch permissions that control which AWS
accounts can use the AMI to launch instances
o A block device mapping that specifies the volumes to
attach to the instance when it's launched.
AWS EC2: Creating AMI
 Select an appropriate EBS-backed AMI
 Launch an instance
 Update an instance
 Create image
 Launch an instance from your new AMI
AWS EC2: Instance Types
 The instance type specify the hardware of the host computer used for your instance.
 Each instance type offers different compute, memory, and storage capabilities.
 Amazon EC2 dedicates some resources of the host computer, such as CPU, memory, and instance storage,
to a particular instance.
 Amazon EC2 shares other resources of the host computer, such as the network and the disk subsystem,
among instances.
 If each instance on a host computer tries to use as much of one of these shared resources as possible, each
receives an equal share of that resource.
 However, when a resource is under-utilized, an instance can consume a higher share of that resource while
it's available.
AWS EC2: Resizing
 If the root device for your instance is an EBS volume, you can change the size of the instance simply by
changing its instance type, which is known as resizing.
 You must stop your Amazon EBS–backed instance before you can change its instance type.
 After resizing, the instance ID does not change.
 If instance has a public IPv4 address, AWS release the address and give it a new public IPv4 address.
 The instance retains its private IPv4 addresses, any Elastic IP addresses.
AWS EC2: Instance Lifecycle
AWS EC2: Reboot, Stop, and Terminate
Characteristic Reboot Stop/start Terminate
(EBS- backed instances only)
Host computer  The instance stays on the  The instance runs on a new host computer  None
same host computer
Private and public  These addresses stay the  The instance keeps its private IPv4 address.  None
IPv4 addresses same  The instance gets a new public IPv4 address
Elastic IP  The Elastic IP remains  The Elastic IP remains associated with the  The Elastic IP is
addresses associated with the instance disassociated from
(IPv4) instance the instance
Instance store  The data is preserved  The data is erased  The data is erased
Volumes
Root device  The volume is preserved  The volume is preserved  The volume is deleted
volume by default
Billing  The instance billing hour  You stop incurring charges for an instance as  You stop incurring
doesn't change. soon as its state changes to stopping. charges for an
 Each time an instance transitions from stopped instance as soon as its
to running, it start a new instance billing hour state changes to
shutting-down
AWS EC2: Instance Termination
 After you terminate an instance, it remains visible in the console for a short while, and then the entry is
automatically deleted.
 By default, Amazon EBS root device volumes are automatically deleted when the instance terminates.
 By default, any additional EBS volumes that you attach at launch, or any EBS volumes that you attach to an
existing instance persist even after the instance terminates.
 If you want to prevent your instance from being accidentally terminated using Amazon EC2, you can enable
termination protection for the instance
AWS EC2: Elastic IP
 An Elastic IP address is a public IP address (static) that you can allocate to instance.
 You can disassociate an Elastic IP address from a resource, and re-associate it with a different resource.
 A disassociated Elastic IP address remains allocated to your account until you explicitly release it.
 To ensure efficient use of Elastic IP addresses, a hourly charge is associated if an Elastic IP address is not
associated with a running instance, or if it is associated with a stopped instance or an unattached network
interface.
 You are not charged for one Elastic IP address associated with the running instance, but you are charged for
any additional Elastic IP addresses associated with the instance.
 By default, all AWS accounts are limited to 5 Elastic IP addresses per region.
AWS EC2: Elastic Network Interfaces
 An elastic network interface is a virtual network interface that you can attach to an instance in a VPC.
 You can create a network interface, attach it to an instance, detach it from an instance, and attach it to
another instance.
 Every instance has a default network interface, called the primary network interface (eth0). You cannot
detach a primary network interface from an instance.
 You can create and attach additional network interfaces. The maximum number of network interfaces that
you can use varies by instance type.
 A network interface can include the following attributes:
o A primary private IP address & one or more secondary private IP addresses
o One Elastic IP address per private IP address
o One public IP address
o One or more security groups
o A MAC address
AWS EC2: Understanding EC2 Billing
 If instance is billed by the hour, you are billed for a minimum of one hour each time a new instance is
started—when it enters the running state.
 If your instance is billed by the second, you are billed for a minimum of 60 seconds each time a new
instance is started—when it enters the running state.
 Instances that are in any other state—such as stopped, pending, etc.—are not billed.
 Examples:
o When you run one instance for 30 minutes and then terminate the instance, you are billed for one
instance hour.
o When you run one instance for 10 minutes, stop the instance, and then start the instance again, you
are billed for two instance hours.
o When you run two EC2 instances of the same type for 30 minutes each, you are billed for two instance
hours.
AWS EC2: Per Second Billing
 With per-second billing, you pay for only what you use.
 EC2 usage are billed on one second increments, with a minimum of 60 seconds.
 Per-second billing is available for instances launched in:
o On-Demand, Reserved and Spot forms
o All regions and Availability Zones
o Amazon Linux and Ubuntu
AWS EC2: Pricing
Resource OS Region Pricing Remarks
t2.micro Linux USE (N. Virginia) $0.0116/ Hr. On-Demand

t2.micro Windows USE (N. Virginia) $0.0162/ Hr. On-Demand

t2.micro Linux On-Demand


AP (Mumbai) $0.0144./ Hr.
t2.micro Windows On-Demand
AP (Mumbai) $0.019/ Hr.
t2.micro Linux USE (N. Virginia) $0.007/ Hr. - Reserved (1 Year, Upfront)
- 42% Saving, On-Demand)

t2.micro Windows USE (N. Virginia) $0.011/ Hr. - Reserved (1 Year, Upfront)
- 30% Saving, On-Demand

*Pricing as on 1st November 2017


AWS EC2: Limitation

Resource Default Limit


EIP per region 5
Running On-Demand t2.micro instances 20
Reserved Instances 20
Hands-On Lab

22
Thank You

You might also like