Can I change the root EBS device of my amazon EC2 instance?
I don't have enough rep to add a comment to the selected answer, but I do want to point out that for me, /dev/sda1
did not work (did not attach as root), but using /dev/xvda
worked (attached as root). The instance is one of the newer t2.micro ones using HVM.
Yep, it's dead easy:
- Stop the instance.
- Detach the root EBS volume.
- Attach the alternate EBS volume as the root:
/dev/sda1
- Start the instance.
This presupposes that your alternate EBS volume is bootable, of course - it has to contain the bootable OS image.