Amazon EC2 allows users to provision compute resources on-demand. With On-demand Instances, Amazon EC2 does not require any commitment, sign-up fees, and upfront payments. Amazon Web Services (AWS) uses a monthly billing cycle; therefore users get charged at end of each month for their EC2 usages.
Amazon EC2 charge in 2 dimensions: instance (server) uptime (total number of hours an instance has been running) and bandwidth consumption. There are 2 types of bandwidth charges: “bandwidth in” or “data transfer in” (the amount of data transferred in Amazon cloud) and “bandwidth out” or “data transfer out” (the amount of data transferred out of Amazon cloud). “Bandwidth in” has a flat rate of $0.10/GB and “bandwidth out” has a tiered pricings starting at $0.17/GB. Where it gets little complicated is on the instance (server) uptime. At the end of each month, AWS tallies the total number of instances hours each type of instance ran and multiplies the total number of hour by their hourly rate. Instances hourly rates depend on 3 things: the type of instance, the EC2 region, and the pricing option.
1- Amazon EC2 Instances types
Amazon EC2 has 7 types of instances. Each instance type has 3 main characteristics: number of EC2 Compute Unite (ECU), memory size (RAM), and the size of the local drive.
2- Amazon EC2 Regions
Amazon EC2 has 3 regions: U.S.- Northern Virginia (US East), U.S.- Northern California (Northern Cal), and Europe – Ireland (EU). The hourly rates for instances in Northern Cal and EU are the same, and hourly rates for instances in US East are about 11.76% cheaper than those in Northern Cal and EU.
3- Amazon EC2 pricing options
Amazon EC2 has 3 pricing options. On-Demand Instances (default pricing), Reserved Instances (RI), and Spot Instances (SI).
a. On-Demand Instances
The On-demand Instances pricing is the default pricing for EC2. This pricing does not require upfront payments (CapEx) or commitments. Although AWS can increase users’ EC2 limits, there is no guarantee the instances will be available. The only way to guarantee capacity with Amazon EC2 is to purchase RI. The On-Demand pricing is ideal for burst capacity, dev/test, and POC.
b. Reserved Instances (RI)
RI allows AWS users to reduce their instances uptime costs by about 30% for 1-year term and 50% for 3-years term over the length of the term. RI requires upfront payments. The amount of upfront payments depends on the term of the RI and the type of instances. Another added benefit for RI is the guarantee capacity. RI guarantees capacity for the instances purchased. I strongly encourage AWS users should purchase RI for their steady usages.
c. Spot Instances
Amazon EC2 auctions un-used EC2 capacity as Spot Instances. Spot Instances allow users to bid on un-used EC2 instances at lower rates than On-Demand instances. However, this auction is a little different than traditional auctions. Amazon EC2 set the hourly rates for each instances type by region and users bid to run Spot Instances at the rates set by Amazon EC2. Amazon EC2 can change the hourly rates of Spot Instances anytime. If the new rates are higher than a user’s original bid rate, Amazon EC2 will terminate the user’s instances. As a result, Spot Instances are not ideal for most use cases and it is not recommended to run critical elements (web servers, data base servers, and most application servers) on Spot Instances. Spot Instances are perfect for load testing, transcoding, files conversions, financial modeling, and for all applications that that have flexible start and end times.
0