How do I know which AMIs are created from instance id i-xxxxxxx

207 views Asked by At

I can describeImages and describeInstances via PHPSDK2. But, How can I find an AMI which was created from any given instance-id?

The description of AMIs doesn't point back to the original instance. Also the description of an instance doesn't have list of AMIs created from it.

The only thing I found similar in both is the kernel-id however, there can be more then one AMIs with same kernel-id as well.

Is there any way to list all the AMIs which are created from given instance?

1

There are 1 answers

0
Ryan Parman On

Not automatically.

Since instances should always be considered disposable (and therefore the instance ID is ephemeral), it's entirely up to you (or the app you write) to add whatever information is relevant to you in the description (or tag, if available for the resource).

See Aws\Ec2\Ec2Client::createSnapshot().