Saturday, January 11, 2014

Buy and Resize AWS RIs from Amazon's RI Marketplace

Anyone using Amazon Web Services (AWS) knows it gets expensive quick. Reserved Instances (RIs) allow AWS to predict capacity, and AWS customers to significantly lower costs. RIs aren't a free ride, however, often requiring a hefty upfront price. What if there you could buy RIs from other AWS customers who no longer needed them, and for a lower upfront cost? You can, of course, and the possibilities just expanded in Fall 2013.

First, a brief history:

September 2012 saw the introduction of the Amazon EC2 Reserved Instance Marketplace for the buying and selling of excess capacity.

Up until recently, purchasing RIs from the RI Marketplace was fairly restrictive. If one wished to take advantage of the Marketplace, they had to ensure an RI matched the EC2 instance type, the availability zone, and the network platform (EC2-Classic or EC2-VPC).

In September 2013, AWS announced the ability to modify the availability zone and network platform of an RI. Then, in October 2013, AWS announced that the instance types of an RI could now be modified. RI Instance types can be modified inside the same family type.

Fig 1
Now, returning to the Reserved Instance Marketplace... What if I want to purchase two Medium reserved instance for a m1.large? First, keeping in mind the new RI modification capabilities, I perform an open search for all RIs in my region.


I find that there are no "3rd Party" offerings currently available under the m1.large type. Now, keeping in mind that I can later modify the instance type, I perform the same search but with Instance Type m1.xlarge.


This time, I find one that fits the bill:


So I make the purchase of this 3rd Party reserved instance. Once the RI becomes active, it becomes a candidate for modification. What if I really needed a m1.large in us-east-1b and a m1.large in us-east-1c? All of that is available through the RI modification interface.


In this case, I had a Heavy RI type. Notice the m1.xlarge was composed of 8/8 units. Referring to Fig 1, I see that this means the xlarge instance type has a normalization factor of 8. A large instance type has a normalization factor of 4. Therefore, I can make two m1.large RIs from one m1.xlarge RI.

So, to recap: You can now purchase a reserved instance from the RI Marketplace, change its type, move it to a new availability zone, and change its network platform. The ways to save money on AWS just multiplied!

Bear in mind: I used the AWS Console for the screenshots contained herein. One can also use the API to make the lookups and changes. I am considering writing a tool to make searches by units within a family rather than by instance type, allowing these searches to be done in one step; here's hoping AWS beats me to it.

No comments:

Post a Comment