3

Let's assume that I have 20 running EC2 instances and 10 active Reserved Instance reservations.

Using the AWS Console or AWS CLI, what is the fastest way to determine which of the running EC2 instances are not 'covered' by a Reserved Instance reservation?

To give more clarity on the desired result, consider the following (not possible in the AWS console that I'm aware of):

  1. Get a list of all running instances in a region. You can do this in the AWS console today and via the AWS CLI.
  2. Get a list of all active Reserved Instance reservations in the same region. you can do this in the AWS console today and via the AWS CLI.
  3. Cross-check the two lists: Every time you see a running instance of size X in zone Y, and there is a Reserved Instance reservation of size X in zone Y, remove it from the running list.
  4. The remainder of instances in the modified running list are all those that are not covered by a Reserved Instance reservation.

I'm looking for a way to get #4 without having to manually copy the two lists available in the AWS console to Excel and manually crossing off running instances as I see a corresponding RI reservations. I could write a script that uses the CLI to do this too, but I was assuming that there might be something that already exists since this is an obvious way of analyzing cost efficiency.

3

If all your EC2 instances are of the same type and in the same region, I don't think there is any way to know which one is covered an which one is not, because a reserved instance is just a billing concept. A reserved instance is never really assigned to a specific EC2 instance.

AWS will look at how many instances you have running and how many reserved instances you have bought and will bill you accordingly. So the best way to determine if you have EC2 instances not covered by your reserved instances is to analyze your AWS bill details and look for the EC2 usage that is not billed as reserved instance.

  • Instances and RI reservations are all in the same region, but of different sizes. I just updated the question to better reflect the desired result. – Les Hazlewood May 22 '15 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.