Ec2 - Aws (1) (1) - 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Amazon Elastic Compute Cloud

(EC2)
Introduction
• Provides scalable computing capacity in the Amazon Web
Services (AWS) cloud.
• Can use EC2 to launch as many or as few virtual servers as
you need, configure security and networking, and manage
storage.
• Enables you to scale up or down to handle changes in
requirements or spikes in popularity, reducing your need to
forecast traffic.
• Windows, Linux most common operating systems
Features
• Virtual computing environments, known as instances

• Preconfigured templates for your instances, known as Amazon Machine

Images (AMIs)
• AMI package the bits you need for your server (including the operating

system and additional software)


• Various configurations of CPU, memory, storage, and networking capacity for

your instances, known as instance types


• Secure login information for your instances using key pairs 

• Temporary storage volumes (Instance store volumes) and permanent storage

volumes (Amazon EBS )


• Multiple physical locations (Regions & Availability Zones)
Features
• A firewall that enables you to specify the protocols, ports, and source
IP ranges that can reach your instances using security groups
• Static IP addresses for dynamic cloud computing, known as Elastic IP
addresses
• Metadata, known as tags, that you can create and assign to your
Amazon EC2 resources
• Virtual networks you can create that are logically isolated from the rest
of the AWS cloud, and that you can optionally connect to your own
network, known as virtual private clouds (VPCs)
• AWS features a wide selection of commercial and free softwares from
well known vendors, designed to run on your EC2 instances.
AMI
• AMI is a template that contains a software configuration
(OS, Appln. Server, Software etc)
• Provides the information required to launch an instance
• AMI includes the following:
– A template for the root volume for the instance (for example, an
operating system, an application server, and applications)
– Launch permissions that control which AWS accounts can use the
AMI to launch instances
– A block device mapping that specifies the volumes to attach to
the instance when it's launched
AMI lifecycle
AMI
• Can customize the instance that you launch from a public AMI and

then save that configuration as a custom AMI for your own use.
• After creating an AMI, can keep it private or share it with a specified

list of AWS accounts. Can also make the custom AMI public so that the

community can use it.


• You can purchase an AMIs from a third party, including AMIs that

come with service contracts from organizations such as Red Hat.


• You can also create an AMI and sell it to other Amazon EC2 users.

• Once Deregistered, an AMI can't be used to launch new instances. 

• It is important to keep AMI up to date


Instances
• Instances are virtual computing environments
• provides a wide selection of instance types optimized to fit different use
cases.
• All backed by Intel microprocessors
• Instance type comprising of various combinations of CPU, memory, storage
and networking capacity
– General Purpose (T2, M4, M3)
– Compute Optimized (C4, C3)
– Memory Optimized (X1, R3)
– Accelerated Computing Instances (P2, G2)
– Storage Optimized (I2-High I/O, D2-Dense Storage)

For More info: https://aws.amazon.com/ec2/instance-types/


Instances

• EC2 is integrated with other AWS services


like
– Amazon Elastic Block Store (EBS)
– Amazon Cloud Watch
– Amazon Virtual Private Cloud (VPC)
– AWS Identity and Access Management (IAM)
Instance types
• Instance type that we specify determines the hardware of the
host computer used for your instance.
• Amazon EC2 provides each instance with a consistent and
predictable amount of CPU capacity, regardless of its
underlying hardware.
• EC2 dedicates some resources of the host computer, such as
CPU, memory, and instance storage, to a particular instance.
• Other resources of the host computer like network and the
disk subsystem are shared among instances.
Instance purchasing options

• On-Demand instances — Pay, by the hour, for the instances that you launch.

• Reserved Instances — Purchase, at a significant discount, instances that are always

available, for a term from one to three years.


• Scheduled Instances — Purchase instances that are always available on the specified

recurring schedule, for a one-year term.


• Spot instances — Bid on unused instances, which can run as long as they are available and

your bid is above the Spot price, at a significant discount.


• Dedicated hosts — Pay for a physical host that is fully dedicated to running your instances,

and bring your existing per-socket, per-core, or per-VM software licenses to reduce costs.
• Dedicated instances — Pay, by the hour, for instances that run on single-tenant hardware. 
Instance lifecycle
• The lifecycle of an instance starts when it is launched and ends when it is

terminated. 
• Purchasing option that you choose effects the lifecycle of the instance.

• On-Demand instance runs when you launch it and ends when you terminate it.

• A Spot instance runs as long as its capacity is available and your bid price is

higher than the Spot price.


• You can launch a Scheduled Instance during its scheduled time period.

• Amazon EC2 launches the instances and then terminates them three minutes

before the time period ends.


• To determine the lifecycle of an instance go to Amazon EC2 console 

navigation pane  select req instance  description tab tenancy


Instance lifecycle

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html
EC2 Root Devices Storage

• Root device volume contains the image used to boot the instance.


• EC2 instance store and EBS backed AMIs
Instance Store
• Physically attached to the host computer
• Type and amount differs by instance
• Data dependent upon instance lifecycle
• Any data on the instance store volumes persists as long
as the instance is running, but this data is deleted when
the instance is terminated (instance store-backed
instances do not support the Stop action) or if it fails
(such as if an underlying drive has issues).
• Cannot be restored once the instance fails/terminated
EBS volumes
• EBS volumes are automatically replicated within the
availability zones (AZ) in which they are created.
• Use EBS optimized instances to deliver dedicated
throughput between Amazon EC2 and Amazon EBS, with
options between 500 and 4000 Mbps, depending on the
instance type
• Attached to only a single instance
• At least 1 GB in size and at most 1 TB
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
EBS
• Use EBS volumes as primary storage for data that
requires frequent updates like the system drive or
database application storage etc.
• EBS volumes persist independently from the
running life of an EC2 instance. 
• Amazon EBS provides the following volume types: 
– General Purpose SSD (gp2)
– Provisioned IOPS SSD (io1)
– Throughput Optimized HDD (st1)
– Cold HDD (sc1)
– Magnetic (standard)
EBS Volumes comparison
EBS Snapshots
• Can back up the data on your EBS volumes to
Amazon S3 by taking point-in-time snapshots.
• Snapshots are incremental backups, which
means that only the blocks on the device that
have changed after your most recent snapshot
are saved. 
• Active snapshots contain all of the information
needed to restore your data (from the time it
was taken) to a new EBS Volume
Two Platforms
• EC2-Classic
– The original release of Amazon EC2
– Your instances run in a single, flat network that you share with other customers.
– An instance that's launched into EC2-Classic or a default VPC is automatically
assigned a public IP address.

• EC2-VPC:
– The original release of Amazon VPC
– Your instances run in a virtual private cloud (VPC) that's logically isolated to your
AWS account.
– An instance that's launched into a non default VPC can be assigned a public IP
address on launch.
Security Groups
• You can use security groups to control who can access your

instances. 
• Can create multiple security groups and assign different rules to

each group. 
• Can then assign each instance to one or more security groups, and

we use the rules to determine which traffic is allowed to reach the

instance.
• Can configure a security group so that only specific IP addresses or

specific security groups have access to the instance.


Amazon S3 Storage of EC2

• Amazon S3 is a repository for Internet data


• EC2 uses Amazon S3 for storing Amazon Machine
Images (AMIs)
• Amazon EC2 also uses Amazon S3 to store snapshots
• Objects are the fundamental entities stored in Amazon
S3.
• Every object stored in Amazon S3 is contained in a
bucket.

You might also like