Retrieving license type (linux/windows/windows+sqlserver) for an Amazon EC2 instance via the API?

Posted by Geir on Stack Overflow See other posts from Stack Overflow or by Geir
Published on 2012-06-15T21:14:03Z Indexed on 2012/06/15 21:16 UTC
Read the original article Hit count: 192

I need to calculate the hourly running costs for my Amazon EC2 instances. This varies even between instances with same hardware configs (instance types) because I use different amazon images (AMIs): some plain windows server and some windows server with sql server (both of them have additional costs compared with plain linux instances)

The EC2 Java API has a describeInstances() method which returns Instance objects with metadata such as instance id, instance type (m1.small/large...), state (running,stopped..) public ip, etc.

This Instance object also has a .getLicense().getPool() which according to the Java API should return "The license pool from which this license was used (ex: 'windows')." I thought this is were it may also give 'windows+sqlserver' or something to that effect.

The getLicense() method does however return null..

I've navigated around the EC2 web console, not being able to find this information, but I'm hoping that it is possible - otherwise it would mean that you cannot identify the true hourly cost of an particular instance unless you know which AMI was used to create it in the first place (plain windows server or windows server with sql server).

Anyone?

Thanks :)

/Geir

© Stack Overflow or respective owner

Related posts about api

Related posts about amazon-ec2