Amazon Elastic Compute Cloud (Amazon EC2)
Amazon EC2 is AWS primary web service that provides resizable compute capacity in the cloud. Amazon EC2 allows you to acquire compute through the launching of virtual servers called instances.Instance is nothing but a Virtual Server.
The instance type defines the virtual hardware supporting an Amazon EC2 instance.There are many instance types available,based on the following dimensions:
Compute Optimized (vCPUs)
Amazon Elastic Compute Cloud forms a central part of Amazon.com’s cloud-computing platform, Amazon Web Services, by allowing users to rent virtual computers on which to run their own computer applications.
General purpose instance family provides a balance of compute,memory,and network resources,and it is a good choice for many applications
Compute Optimized instances are optimized for compute-intensive workloads and delivers high performance computing,batch processing
GPU Compute instances are next generation of general purpose GPU computing instances.We can use GPU instances for 3D visualizations,graphics-intensive remote workstation, 3D rendering, application streaming, video encoding, Machine/Deep learning, high performance computing and other server-side graphics workloads.
Memory Optimized category instances are most suitable for high performance databases,distributed memory caches,in-memory analytics,large-scale,enterprise-class,and In- memory applications.
Optimized category instances are most suitable for low latency,very high random I/O performance, high sequential read throughput and provide high IOPS and No SQL databases like Cassandra, Mongo DB,Redis and In-memory databases.
|Compute optimized||For workloads requiring significant processing|
|Memory optimized||For memory-intensive workloads|
|Storage optimized||For workloads requiring high amounts of fast SSD storage|
|GPU-based instances||Intended for graphics and general-purpose GPU compute workloads|
Instance launch pricing Options
- On-Demand Instances
- Reserved Instances
- Spot Instances
The price per hour for each instance type published on the AWS website represents the price for On-Demand Instances.
On-Demand is most flexible pricing option,a sit doesn’t require sup-front commitment.
Suitable for un predictable workloads.
We will have control over when the instance is launched and when it is terminated
When purchasing are served instance we have to specify the instance type and Availability Zone for that Reserved Instance and achieves a lower effective hourly price for that instance for the duration of the reservation.You can select duration from1 Yr to 3yrs.
We have two offering classes in RI: Convertible or Standard
We have three payment options for Reserved Instances.
All Up front— Pay for the entire reservation up front.There is no monthly charge for the customer during the term.
Partial Up front-— Pay a portion of the reservation charge up front and the rest in monthly installments for the duration of the term.
No Up front— Pay the entire reservation charge in monthly installments for the duration of the term.
We can save up to 75 percent over on-demand hourly rate if were serve instance through Reserved Option
For work loads that are not time critical and are tolerant of interruption,Spot Instances offer the greatest discount.
We can specify the price they are willing to pay for a certain instance type.
When the bid price is above the current Spot price,we’ll get the requested instance.
These instances will operate like all other Amazon EC2 instances,and the customer will only pay the Spot price for the hours that instance(s) run.
The instances will run until:
Till we terminate them manually.
The Spot price goes above our bid price.
There is not enough un used capacity to meet the demand for Spot Instances.
If Amazon EC2 needs to terminate a Spot Instance,the instance will receive a termination notice providing a two-minute warning prior to termination.
If we terminate Instance manually we have to pay for Partial hours,if amazon terminates we will not get charged for partial hours
Shared Tenancy— Shared tenancy is the default tenancy model for all Amazon EC2 instances. A single host machine may house instances from different customers.(One host may share with multiple customers).
Dedicated Instances— Dedicated Instances run on hardware that’s dedicated to a single customer.As a customer runs more Dedicated Instances,more underlying hardware may be dedicated to their account.
Dedicated Host— An Amazon EC2 Dedicated Host is a physical server with Amazon EC2 instance capacity fully dedicated to a single customer’s use.We will get complete control over which specific host runs an instance at launch
A placement group is a logical grouping of instances with in a single Availability Zone.
Placement groups enable applications to participate in a low-latency,10 Gbps network.
Recommended for applications that benefit from low network latency, high network throughput, or both.
Only certain types of instances can be launched in a placement group.
A placement group can’t span multiple Availability Zones.
The name you specify for a placement group must be unique with in your AWS account.
AWS recommend homogeneous instances with in placement groups.
You can’t merge placement groups.
You can’t move an existing instance into a placement group.
Amazon Machine Images (AMIs)
All AMIs are based on x86OSs,either Linux or Windows.
We can launch instances from four options.
- Published by AWS
- AWS Market place
- Generated from existing Instance(Custom AMIs)
- Uploaded Virtual Servers
We can access our Instances by Using Public DNS,Public IP address and Elastic IP addresses.
Public DNS: When we launch instance, we will get one Public DNS associated for that instance
Public DNS will generate automatically.We can’t specify.
We can found this information in Instance description.
We can not transfer this Public DNS to another instance.
We will get public DNS when the instance is in running state.
When we launch instance,we will get one Public IP address also.
AWS will allocate this address,no option to select specific IP.
This is unique on the Internet.
An Elastic IP address is a static IPv4 address designed for dynamic cloud computing.An Elastic IP address is associated with your AWS account.
To use an EIP address,we have to generate one to our AWS account,and then associate it with your instance or a network interface.
We can disassociate an EIP address from a resource,and re associate it with a different resource.
A disassociated EIP address remains allocated to your account until you manually release it.
By Default,we are limited to 5 Elastic IP addresses per region.
Steps to get EIP Address:
- Login to AWS account and navigate to Amazon EC2 console.
- In the navigation pane,choose Elastic IPs.
- Choose Allocate new address.
- Select Allocate.Close the confirmation screen.
Enhanced networking:reduces the impact of virtualization on network performance by enabling a capability called Single Root I/O Virtualization (SR-IOV).This results in more Packets per Second, lower latency,and less jitter.
Current Generation Instance types
|Instance Family||Current Generation Instance Types|
|General purpose||t2.nano | t2.micro | t2.small | t2.medium | t2.large | t2.xlarge | t2.2xlarge | t3.nano | t3.micro | t3.small | t3.medium | t3.large | t3.xlarge | t3.2xlarge|
|Compute optimized||c4.large | c4.xlarge | c4.2xlarge | c4.4xlarge | c4.8xlarge | c5.large | c5.xlarge | c5.2xlarge | c5.4xlarge | c5.9xlarge | c5.18xlarge|
|Memory optimized||r4.large | r4.xlarge | r4.2xlarge | r4.4xlarge | r4.8xlarge | r4.16xlarge | ×1.16xlarge | ×1.32xlarge | x1e.xlarge | x1e.2xlarge | x1e.4xlarge | x1e.8xlarge | x1e.16xlarge | x1e.32xlarge ||
|Storage optimized||d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge | h1.2xlarge | h1.4xlarge | h1.8xlarge | h1.16xlarge | i3.large | i3.xlarge | i3.2xlarge | i3.4xlarge | i3.8xlarge | i3.16xlarge|
|Accelerated computing||f1.2xlarge | f1.4xlarge | f1.16xlarge | g3s.xlarge | g3.4xlarge | g3.8xlarge | g3.16xlarge | p2.xlarge | p2.8xlarge | p2.16xlarge | p3.2xlarge | p3.8xlarge | p3.16xlarge|
Here is a diagram that represents the transitions between instance states.Note:We can’t stop and start an instance store-backed instance.
More Information :https://www.fgrade.com/aws/