0

My AWS account runs approximately 50 instances.

They all run Windows, but they vary between being just Windows, or running SQL Server STD or SQL Server Web.

I'd like to find a way of exporting all my instances along with their Instance Type (r3.xlarge, etc) but also the SQL Server Licence they are running.

This is to enable me to pull this data into various reporting tools so I can compare the running cost per hour of each server against clients, etc.

At the moment, I can pull and automate the Instance Types, but I have to manually enter the SQL Server licencing in order to get the cost per hour.

1

Just one time, you need to add a metadata key/value pair for each instance. Assuming on-demand or reserved (not spot), your costs are quite fixed.

Thus, your tag could be not just the SQL price, but could actually be the SUM of the hourly cost for that type PLUS the sql cost for that type, e.g. 'serverplussql=.58' would be the tag of one vs. 'serverplussql=.89' for another.

Thus, you can simply multiply the number of hours the server is up by the the 'serverplussql' price and BAM! - you have the total cost.

Of course, if you want to itemize, or if you are running spot instances where the server price is not fixed, then you'd want to keep it just the sql cost; or perhaps have two tags, e.g. a second tag like so, 'justsql'=.08.

Another advantage of the metadata tag(s) is you can (optionally) utilize query 'filters' of the describe-instances API.

| improve this answer | |
  • Yes, I had considered this option, that I run through every server and flag what it is running. I was just hoping someone would know of an alternative. Amazon obviously know what each server is running so that they can charge me accordingly so why can't I list the same information. – Robin Day Mar 10 '15 at 8:46

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.