2

When you create an AMI Image of an EC2 Instance the kernel-id of an instance and AMI's kernel-id will always be the same, correct?

TeaCupApp
  • 11,316
  • 18
  • 70
  • 150

2 Answers2

4

If you are using create-image through the API / command line / web console, then yes, the AKI (kernel image) associated with the new AMI will be the same as the AKI of the running instance.

If you want to use a different AKI you could:

  • stop the instance

  • snapshot the root EBS volume

  • register the snapshot as a new AMI, specifying a different AKI id.

  • start the instance

This is the procedure followed by create-image but it defaults to using the same AKI.

That said, it would be a rare situation where you wanted to use a different AKI as the default on Amazon is to us PV-GRUB, which just loads the kernel from the image on your AMI.

Eric Hammond
  • 22,089
  • 5
  • 66
  • 75
  • Thank you for the elaboration,It is pain in the (...) to find an AMI from an instance id. I want to get an AMI which was created from any given instance id. However I will as this as a separate question. – TeaCupApp Jan 10 '14 at 02:46
2

Yes. It defaults to the kernel-id of the original instance. However, you can always change it at create time, assuming it's a compatible kernel.

Rico
  • 58,485
  • 12
  • 111
  • 141