| Did this page help you? Yes No Tell us about it... |
Amazon Elastic Block Store (Amazon EBS) can be an effective way to store data that you otherwise might lose when your Spot Instance terminates.
To set up the persistence of Spot Instance data, you map the Spot Instances that will be launched to
an existing Amazon Elastic Block Store (Amazon EBS) snapshot. Set the delete-on-termination
flag to false; this indicates that Amazon EC2 shouldn't delete the Amazon EBS volume when the spot instance terminates.
Let's walk through making an example Spot Request with the following specifications:
Bid price of $0.5
One instance of the m1.xlarge instance type
Block device mapping to a snapshot that shouldn't be deleted when the Spot Instance is terminated
You can do this example using either the CLI or API tools. Using the CLI, your example request should look like this:
PROMPT>ec2-request-spot-instances -p 0.5 -t m1.xlarge -n 1 -b '/dev/sdb=snap-a123bcde:20:false' ami-8e1fece7
For more information, see: