Ruby AWS - Programmatically generate list of available AWS instance types
amazon-ec2, amazon-web-services, ruby
Solution
As far as I can tell this isn't possible. If it were possible, amazon would list the api call in their documentation.
I find the omission a little odd considering the've got apis to list pretty much anything else.
You could maybe kludge it via the `DescribeReservedInstancesOfferings` call, which lists all the kinds of reserved instances you can buy - I would have thought that extracting the unique instance-types from that would be a reasonable approximation (as far as I know there are no instance types you can't get reserved instances for). Doesn't look like the `aws` gem supports it though. The official amazon sdk does, as does fog
Problem
I've recently begun using the `aws` gem in a Sinatra web application whose purpose is to provide a customized frontend to instance management (integrating non-AWS tools). I am currently working on the form to allow a user to set all the options that might need setting, and one of those options is instance type (m1.small, c1.medium, etc). What I'd like is to be able to reach out to some source to pull a list of available types. I have looked through the AWS::EC2 documentation and haven't found anything matching this description. I've got no need to insist that a solution be part of the `aws` gem, but even better if it is, because that's the tool I'm already using. Do you know of a way to gather this information programmatically?