Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attach existing EBS as root device in spot instance request

Is it possible to include an existing, unattached, available EBS volume as the root device in a spot instance request? I'd like to create a setup where the system is up and running when the spot price is met, and after a termination and the spot price comes back into range I can re-request and start an instance right where I left off.

thanks!

like image 704
Mark Kropf Avatar asked Nov 29 '12 18:11

Mark Kropf


1 Answers

While Overriding the AMI's Block Device Mapping as such is possible, the root device is the exception, unfortunately:

Any instance you launch automatically includes any storage devices in the AMI's block device mapping. You can override that mapping by specifying a block device mapping with the changes that you want at launch time. In your overrides, you can modify the mapping for any of the storage devices except the root device volume. [emphasis mine]

This is also reflected in the respective wizards within the AWS Management Console, which only allow to adjust the root volume size, but not the snapshot it is based upon, see the image within Changing the Root Device Volume to Persist.

like image 198
Steffen Opel Avatar answered Nov 27 '22 18:11

Steffen Opel