Booting an EC2 instance from an existing EBS volume

EBS volumes can be attached and detached from EC2 instance.

If you have an EC2 instance that crashes for some reason, you can move the root volume to another EC2 intance.

  1. Launch a new EC2 instance.
  2. Stop that EC2 instance.
  3. Detach the root volume from the new instance. Make note of the device name that it was attached as (such as /dev/sda1).
  4. Detach the root volume from the original instance.
  5. Attach the root volume from the original instance to the new instance, using the same device name (such as /dev/sda1).
  6. Start your new instance.

Technically, it can be done.

However, you may encounter the same problem that you had with the original EC2 instance since you’re booting from the original root volume.

Another thing you can do is to attach the original root volume as a non-root volume on your new EC2 instance, such as /dev/sdb1. If you do this, you can examine the data on the volume to determine the cause of the crash and perhaps fix it.

One more thing, while you can make an AMI image out of an EBS snapshot, you can also make AMI images directly from the EC2 instance instead. As a process, this often is simpler.

Leave a Comment