Fernando CortÃ©s - Fotolia
Amazon Web Services (AWS) is a collection of services that includes storage services such as Simple Storage Service (S3), Elastic Compute Cloud (EC2) and more. These IT infrastructure services are offered in the form of Web services that Amazon refers to as cloud computing. Amazon EC2 is the AWS computing service.
When users decide to share their IT responsibility with a public cloud provider and move some of their applications to a public cloud, AWS EC2 is frequently the choice. Prior to services such as EC2, users had to go through a lengthy process to complete the purchase of a server, including finding the money to pay for it. Then the server had to be installed, connected to the on-premises network and tested. EC2 offers computing capacity on demand, no upfront server costs, almost immediate availability and no commitment for length of use. The total commitment a user has to make to EC2 is one hour, the minimum billing period for an EC2 instance (virtual machine).
Using EC2 means booting an Amazon Machine Image (AMI) to create a virtual machine. Using Amazon's terminology, a running virtual machine is referred to as an instance. When an instance is not running it is referred to as an image. A launched image becomes an instance.
To create a virtual machine, you need to understand AWS's concept of Instance Family and Instance Type. When you create a virtual machine, you specify an instance type. The choice of an instance type conveys the combination of CPU, memory and storage that you believe is required to run your application. An instance type allows you to match the instance "size" with your application or workload requirements. AWS provides a matrix of instance types with the number of virtual CPUs, memory, storage and the instance type's hourly charge information.
If you want to run a high-performance application in the EC2 environment, you would boot an AMI specifying an instance type from the Compute Optimized (C3) family using one of the five C3 instance types in Table 1 below. The number of vCPUs, memory, storage and hourly charge for each instance type can be viewed in Table 2. You would examine the size (number of vCPUs, memory and storage) of each C3 instance type, along with the hourly charge, to determine which C3 instance type is right for your budget and your application requirements.
The instance type C3.2xlarge is read as C3 double extra large. It has eight vCPUs, 15 GB of memory, two 80 GB SSD drives and costs $0.42 per hour (when the instance is running).
The C3 family should be targeted for high performance applications such as Web servers, on-demand batch processing, high-performance engineering and analytic applications. The R3 family is recommended for high-performance databases, large deployments of SAP and other enterprise applications that may require serious compute power and large storage.
The storage optimized family of instance types (I2, HS1) is ideal for scale out transactional processing, data-warehousing-based applications, Hadoop processing of unstructured data and clustering. G2 (graphical) instance types are ideal for gaming applications, video streaming and server-based graphic workloads. The micro instance types (T1, M1) are for use with low traffic websites, small applications, etc.
Instance type pricing
Pricing for EC2 instance types can be complex and not all of the details are presented in this article. Some tips on selecting instance types and instance type pricing are provided later.
In parallel with selecting the instance type, you need to determine how you are going to "rent" the instance type. You can rent the instance type as an On-Demand instance, a Reserved instance or as a Spot instance. Pricing is per instance type per hour from the time an instance is launched until it is stopped or terminated. Partial hours are billed as full hours.
On-Demand lets you pay for compute capacity by the hour with no long-term commitment. The above cost for C3.2xlarge is the On-Demand hourly charge. Reserved instances give you the option to make a low, one-time, upfront payment for each instance that you want to reserve. This upfront payment allows you to receive a discount on the hourly charge for that instance. For example, the Reserved pricing for the C3.2xlarge instance type is $1,072 upfront (one-year term) for an hourly charge of $0.157 (the three-year term is $1,655 upfront and a $0.137 per hour charge). The Reserved hourly charge is significantly lower than the $0.42 hourly charge for the corresponding On-Demand instance.
There are three Reserved instance types (Light, Medium and Heavy Utilization) that enable you to more accurately select the instance type that you need. The hourly charge increases from Light to Medium to Heavy Utilization.
There is a third way to purchase instance types: the Spot instance. Spot instances allow you to bid on unused EC2 capacity and run those instances for as long as your bid exceeds the current Spot hourly charge. Spot instances allow you to specify the maximum hourly charge you are willing to pay for a particular instance type. Amazon frequently updates the Spot hourly charge for each of the instance types. For the C3.2xlarge instance type, the Spot instance hourly charge could be as low as $0.0642 per hour. This is clearly lower than the On-Demand and Reserved hourly charges.
Tips on selecting instance types and pricing
How do On-Demand, Reserved and Spot differ? On-Demand and Reserved instance types are functionally the same; they launch and terminate the same. With a Reserved instance, you pay a low, one-time payment to receive a lower hourly charge than you would get with On-Demand. The up-front payment for Reserved is not refundable whether or not you use the instance type at all. You should only select Reserved when you expect to use a relatively large number of hours; otherwise, paying the upfront payment could be a poor strategy.
You should construct the following type of table (Table 2) when purchasing instance types. The numbers in this table are based on published data on the AWS website for the C3 instance type with Linux as the operating system, U.S. East region, heavy utilization and one-year term. The table assumes that the instance is up 24 hours per day or about 730 hours per month (or 8,760 hours per year). The savings represented in Table 2 are the maximum savings since we are running 24 hours per day. Savings will drop as the hourly usage drops.
It is strategically important for you to have some On-Demand instance types and some Reserved instance types. Customers using both On-Demand and Reserved instances will have Reserved instance rates applied first to minimize costs. For example, if the number of running instances each hour is less than or equal to the number of applicable Reserved instances you have, all running instances will be charged at the Reserved instance hourly rate. Reserved instances are not available for instances running IBM products.
Spot instance pricing can have some significant advantages over On-Demand and Reserved instance pricing, but at some risk. They do not have any upfront commitment and hourly charges are usually lower than On-Demand hourly charges. The Spot instance hourly charge fluctuates based on supply and demand for all instances but customers never pay more than the maximum hourly charge they have specified. The problem is that if the Spot instance hourly charge moves beyond your maximum hourly charge specified for an instance type, then Amazon will shut down your instance type.
There are numerous things for you to consider when selecting appropriate instance types and the type of pricing that is most cost effective for you. On-Demand will keep your instance types up and running forever if you so choose. Reserved may cost you money if you do not use instance types enough (see Table 2). And Spot instances can lead to having an instance type terminated at the most inopportune time. In addition, Spot instance pricing requires you to constantly juggle your maximum hourly charge to make sure termination does not occur. We recommend that you read Amazon's EC2 Pricing document for additional details on instance type pricing.
Other variables to consider when creating an instance to run your application(s) besides the instance type, operating system and type of pricing, include the type of AMI you should use (S3-backed or Elastic Block Storage-backed), which type of virtualization is most desirable for your application(s) and paravirtual or hardware virtual machine.
If your company is serious about sharing its IT responsibility with Amazon, then you need at least one person dedicated to following EC2 instance type pricing, instance type sizing and the many other variables involved in using AWS EC2 to fit your budget and application requirements.
For more information:
- AWS has two types of Amazon Machine Images. EC2 images that are stored in the Amazon Simple Storage Source (S3) are referred to as S3-backed images. EBS-backed images differ from S3-backed images because an EBS-backed image uses a persistent EBS volume for instance storage.
- Some non-Amazon created AWS documents do not use Amazon-developed terminology for AWS. These documents generally refer to instance family as instance type, and instance type as instance size. We agree that the non-Amazon terminology is more meaningful and presents a clearer description of what is trying to be conveyed because type generally implies a set of values. In this article, however, we use the Amazon definitions.
About the author
Bill Claybrook is a marketing research analyst with over 35 years of experience in the computer industry with the last dozen years in Linux, open source and cloud computing. Bill was research director, Linux and open source, at The Aberdeen Group in Boston and a competitive analyst/Linux product-marketing manager at Novell. He is currently president of New River Marketing Research and Directions on Red Hat. He holds a Ph.D. in Computer Science.
Research instance pricing
Choose the best instance for your business
Can you Spot the instance?