Auto-Attach EBS-volume to a New Spot Instance?

Posted by Jeff on Server Fault See other posts from Server Fault or by Jeff
Published on 2012-11-13T01:21:47Z Indexed on 2012/11/13 5:03 UTC
Read the original article Hit count: 480

Filed under:
|
|

I am experimenting with EC2 spot instances, and am needing some data to be retained between terminations. Now as I understand it, when the current price goes above my max. bid, it will be automatically terminated. I assume any init scripts I have will be run on shutdown so I can push data off to the EBS before unmounting.

My question is, how can I automatically mount the same EBS volume on the new spot instance once the price goes down, since it won't have any of my init scripts that I would've loaded onto the root volume the first time?

Do I have to create a custom AMI, or is there some other way to achieve this?

© Server Fault or respective owner

Related posts about amazon-ec2

Related posts about amazon-ebs