AWS – EC2

EC2 Deployment Unit – Virtual Machines

Run any application. Control and manage server or cluster level functions such as scaling and deployment.

You provision, scale, and manage server capacity. EC2 offers a wide selection of instance configurations optimized for every use case.

Amazon EC2

  • Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) cloud.
  • Using Amazon EC2 eliminates your need to invest in hardware up front, so you can develop and deploy applications faster.
  • You can use Amazon EC2 to launch as many or as few virtual servers as you need, configure security and networking, and manage storage.
  • Amazon EC2 enables you to scale up or down to handle changes in requirements or spikes in popularity, reducing your need to forecast traffic.
  • Amazon Elastic Compute Cloud (EC2) allows users to rent virtual computers on which to 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 hour for active servers – hence the term “elastic”.

Instance

  • An instance type essentially determines the hardware of the host computer used for your instance.
  • Instance types comprise varying combinations of CPU, memory, storage, and networking capacity and give you the flexibility to choose the appropriate mix of resources for your applications.
  • Each instance type offers different compute and memory capabilities.
  • Select an instance type based on the amount of memory and computing power that you need for the application or software that you plan to run on the instance.

Concepts to launch instances on AWS

  • Amount of virtual hardware dedicated to the instances.
  • Software loaded on the instance.

Two dimensions of new instance are controlled by:

  • Instance type
  • AMI ( Amazon machine images)

Instance types

  • T2 instances
  • Compute optimized instances
  • Memory optimized instances
  • Storage optimized instances
  • Accelerated computing instances
  • T1 micro instances
  • Resizing instances
  • T2 instances – T2 , M4 , M3
  • Compute optimized instances – C3 , C4
  • Memory optimized instances – R3, R4 , X1
  • Storage optimized instances – D2, D3, I3
  • Accelerated computing instances- F1 , P2 , G2, CG1
  • T1 micro instances – t1. micro
  • Resizing instances

74

To choose Instance type

  • Specify network performance – low , moderate and high, – for workloads requiring greater network performance many instances support enhanced networking.
  • It results in more PPS (packets per second ), lower latency and less jitter.

Securely using an Instance

  • Addressing an instance : name in description tab of console or via CLI or API.
  • Public IP
  • Elastic IP
  • Initial access : EC2 uses public key cryptography- keys together form keypair.
  • Virtual firewall protection- allows you to control traffic based on port, protocol, source & destination.

Amazon Machine Image (AMI)

An AMI is a template that contains the software configuration (operating system, application server, and applications) required to launch your instance.

Like all virtual appliances, the main component of an AMI is a read-only filesystem image that includes an operating system (e.g., Linux, Unix, or Windows) and any additional software required to deliver a service or a portion of it

Sources of AMI

  • Published by AWS
  • AWS marketplace
  • Generated from existing instances
  • Uploaded virtual servers

AMI & Instance

  • From an AMI, you launch an instance, which is a copy of the AMI running as a virtual server in the cloud.
  • You can launch multiple instances of an AMI, as shown in the following figure.75

AMI – Operating Systems

EC2 service offers around 60,000 AMI’s. The prominent being

  • Amazon Linux AMI based on Red Hat Enterprise Linux
  • Linux (Redhat/SUSE/Ubuntu Enterprise)
  • Windows Server 2016, Windows Server 2012, Windows Server 2008

Features of EC2

  • Instances – virtual computing environments.
  • Amazon Machine Images- AMIs preconfigured templates for instances.
  • Instance types – various configurations of CPU, memory, storage & networking capacity.
  • Key pairs – secure login information for instances.
  • Instance store volumes – volumes for temporary data that is deleted when you stop or terminate your instance.
  • EBS volumes – persistent storage volume for your data.
  • Regions & availability zones – multiple physical locations of your resources.
  • Security groups – a firewall that enables you to specify the protocols , ports and source IP addresses.
  • Elastic IP addresses – static IPV4 addresses for dynamic cloud computing.
  • Metadata – also known as tags that you can create and assign to your EC2 instances.
  • Virtual private cloud – virtual networks you can create that are logically isolated from rest of AWS cloud.
  • EBS optimized instances.

Amazon Elastic Block Store

  • Provides persistent block level storage volumes for use with Amazon EC2 instances.
  • EBS volume is automatically replicated within availability zone.
  • Multiple EBS volumes can be attached to a single instance at a time.
  • EBS volume types vary in hardware, performance and cost.
  • Types of Amazon EBS volumes – Magnetic volumes (HDD) , general purpose SSD, and provisioned IOPS SSD.

EBS optimized instances

  • It enables EC2 instances to fully use the IOPS provisioned on an EBS volume.
  • It delivers dedicated throughput between Amazon EC2 & EBS between 500 – 4000 mbps.
  • The dedicated throughput minimizes contention between EBS I/O and other traffic from your EC2 instance, providing the best performance for your EBS volumes.
  • Designed for use with both standard and provisioned IOPS Amazon EBS volumes.

Multiple locations

  • It provides the ability to place instances in multiple locations.
  • By launching instances in separate availability zones , we can protect applications from failure of single location.
  • The Amazon EC2 service level agreement commitment is 99.95% availability for each Amazon EC2 region.

Elastic IP addresses

  • These are static IP addresses designed for dynamic cloud computing.
  • An Elastic IP address is associated with your account not a particular instance.
  • Elastic IP addresses allow you to mask instance or availability zone failures by programmatically remapping your public IP addresses to any instance in your account.

Amazon Virtual private cloud

  • It lets you provision a logically isolated section of AWS cloud where you can launch AWS resources in a virtual network that you define.
  • You can have complete control over virtual networking environment.
  • You can create a hardware virtual private network connection between corporate datacenter and VPC.

Amazon Cloud watch

  • It is a web service that provides monitoring for AWS cloud resources and applications starting with Amazon EC2.
  • It provides you with visibility into resource utilization, operational performance and overall demand patterns.
  • You can get statistics, view graphs and set alarms for your metric data.
  • To use cloud watch, you can simply select the instance that you’d like to monitor.

Auto scaling

  • It allows you to automatically scale your Amazon EC2 capacity up or down according to the conditions defined.
  • With auto scaling , we can ensure that the number of Amazon EC2 instances you’re using scales up during demand spikes to maintain performance.
  • It scales down automatically to minimize costs.

High performance computing (HPC) clusters

  • These are required for customers with complex computational workloads such as tightly coupled parallel processes,
  • Used for applications sensitive to network performance , can achieve high compute and network performance.
  • Cluster instances also provide significantly increased throughput making them well suited for customer applications that need to perform network – intensive operations.

Accelerated compute instances

  • It is a family of instances which use hardware accelerators , co-processors to perform some functions such as floating point number calculation and graphic processing.
  • It can perform calculations more efficiently than is possible in software running on CPUs.

GPU compute & Graphic instances

  • It is used for customers requiring massive floating point processing.
  • It can perform 40 thousand parallel processing cores
  • Ideally suited for machine learning.
  • Used in high performance databases, computational fluid dynamics , computational finance , seismic analysis , molecular modeling , genomics and rendering workloads.
  • GPU graphic instances are for customers that require high graphics .

System manager

  • It is a management service that helps you automatically collect software inventory, apply OS patches, create system images and configure operating systems.
  • It helps to define and track system configurations.
  • It maintains software compliance of EC2 and on premises configurations .

EC2 – Common Use Cases

  • Big data (e.g. Hadoop, Spark)
  • Database software (e.g., Aurora, DynamoDB)
  • Enterprise applications (e.g., SAP, Oracle, Sharepoint)
  • Migrations from on-premises environments, including BYOL
  • Open-source cluster management

Benefits of EC2

1.Elastic Web-Scale Computing

2.Completely Controlled

3.Flexible Cloud Hosting Services

4.Designed for use with other Amazon Web Services

5.Reliable

6.Secure

7.Inexpensive

8.Easy to Start

 

EC2 pricing

Amazon EC2 is free to use. There are four ways to pay for Amazon EC2 instances :

  • On demand instances
  • Reserved instances
  • Spot instances
  • Dedicated hosts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s