Amazon Computer Services
What is Amazon Elastic Compute Cloud (EC2)?
Amazon EC2 is a web service that gives compute size in the AWS cloud. We can package the operating framework, application program, and related configuration settings into an Amazon Machine Image (AMI). We can then use these AMIs to provision different virtualized instances just as decommission them utilizing web service calls.
EC2 instances can be resized, and the number of instances scaled up or down to match your requirements or demand. These instances can be released in at least one geographical areas or districts, and Availability Zones (AZs). Each region comprises of multiple AZs at distinct areas, linked by low latency networks in a similar region.
Features of Amazon EC2
Amazon EC2 supports the following features:
- Virtual computing environments referred to as instances.
- It can preconfigure layout for our instances, called Amazon Machine Images (AMIs) that bundle the bits we require for our server (containing the operating framework and additional programming).
- It is used to several setups of CPU, memory, storage, and system capacity for our instances called instance types.
- It can protected login data for our instances using key pairs (AWS saves the public key, and we store the private key in a secure place).
- It can storage volumes for temporary records that are deleted when we stop or terminate our instance, called instance store volumes.
- It is used to persistent storage volumes for our records using Amazon Elastic Block Store (Amazon EBS), named Amazon EBS volumes.
- It can generate several physical areas for our resources, including, instances and Amazon EBS volumes, called Regions and Availability Zones.
- A firewall that allows us to determine the protocols, ports, and source IP ranges that can reach our instances using security groups.
- It can be static IPv4 addresses for powerful cloud computing, called Elastic IP addresses.
- Metadata, known as tags that we can create and assign to our Amazon EC2 resources.
- Virtual networks that we can make that are logically separated from the rest of the AWS cloud, and that we can alternatively be linked to our system, called virtual private clouds (VPCs).
Pricing for Amazon EC2
Amazon EC2 supports the following purchasing options for instances:
By default, EC2 hourly prices are used at the On-Demand rate. In this mode, compute (CPU and memory) is used as and when required. There is no need to have any long-term commitment. Compute capacity can be increased or decreased on the fly, to meet the business needs.
It allows us to bid for a spare Amazon EC2 compute capacity. Usually, these can be up to 90% cheaper than On-Demand instances. It requires us to offer, and it specifies the maximum price we want to pay per instance along with instance type and AZ. We get our spot instance, based on availability and current spot pricing in the specified AZ.
The prices, for instance, types vary based on the availability of spare capacity in the specified AZ. In other words, it’s all about the supply and demand ratio of additional capacity. As the demand for a specific instance type in spot instance increases, spot instance prices also increase. When the current spot instance price goes above our bid price, AWS terminates our spot instance. Before ending EC2 spot instances, AWS gives a notification, two minutes before termination.
This provides a significant discount on the On-Demand per hour prices. We can Reserve Instance for a one or three-year duration for our predictable resource demand. It offers three types of reservation request: All Upfront, Partial Upfront, and No Upfront payment options. With the all Upfront payment option, we can save up to 75% in comparison to On-Demand pricing.
In the Partial Upfront method, a partial amount of total billing is paid upfront, and the remaining amount is paid monthly.
The third option for reservation is with No Upfront cost wherein we pay only monthly for our Reserved Instances. Even with No Upfront reservation, we can save around 35% to 40% of the value in comparison to On-Demand pricing.
In a standard scenario, when you launch an EC2 instance, it is provisioned in a virtual environment hosted on shared hardware. Though each instance has its dedicated resources, it shares the hardware platform with other accounts. When using Dedicated Hosts, EC2 instances from the same AWS account are physically isolated on Dedicated Hosts (that is, hypervisor).
A Dedicated EC2 instance using the same architecture may share hardware within the AWS account. It gives additional control over host hardware. It facilitates to join corporate compliance and regulation requirements. The pricing model for the Dedicated Hosts also can be an On-Demand, reserved (save up to 70%), or spot instance (save up to 90%).
Dedicated EC2 instance has two pricing components:
- It can be the applicable price per hour, based on the selected pricing model
- It can also be dedicated per region fees. It is $2, suitable per hour for partly one Dedicated EC2 instance of any type running per region.