List all possible instance types for a specific AMI?

1.5k Views Asked by At

I know this has been asked before, but I have yet to find a workaround or solution for getting the list of possible instance types for a given Amazon AMI. I'm using the .NET SDK. Has anyone been able to figure out a way to do this?

1

There are 1 best solutions below

2
On

This is not possible.

An AMI is merely an image of a disk. AWS can (usually) detect the Operating System of the AMI (eg Windows, Linux) but it has no knowledge of the software actually installed on the AMI.

In general, any instance type can be used for any AMI. The exception to this is the virtualization type -- some Linux AMIs might only run on PV (Paravirtualization) or HVM (Hardware Virtual Machine).

If you are launching an instance from an AMI provided by AWS, the EC2 Management Console is smart enough to ensure that the correct Instance Type is selected for the given virtualization type.

However, if you (or somebody else) created the AMI, there is no way to know the type of virtualization and therefore no way to know which instances would support it.

These days, the default is HVM, which is supported by all modern instance types (but not m1 for example).