Instance and Instance's AMI's Kernel-ID

2.6k Views Asked by At

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?

2

There are 2 best solutions below

0
On BEST ANSWER

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.

1
On

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.