I had an Amazon EC2 Spot instance running, but the instance was reclaimed, and I’m concerned I may have lost data. Are there ways to recover my instance or the data stored on that instance?

With Amazon EC2 Spot, you can bid on spare EC2 instances to reduce your compute costs. If you choose to terminate your instance, or the Spot Price increases above your bid price (whichever is sooner), the EC2 Spot instance can be reclaimed. For a more detailed description of the reasons a Spot instance can be reclaimed, see How Spot Instances Work. Data that isn't backed up can be lost when instances are reclaimed, so it's important to ensure that your application is prepared for a Spot instance interruption. If you have an application that cannot be interrupted, we do not recommend Spot instances. See Spot Use Cases for a list of best-suited use cases and workload types.

If you have a Spot instance that was recently terminated or reclaimed, and you’re concerned that data might have been lost, here are some places to check for your data:

  • Did you configure your instances to leave EBS volumes behind if the instance is terminated? Check the Volumes pane of the Amazon EC2 console for any unattached volumes. If you attached a volume to your Spot instance before it was terminated or reclaimed, the data you’re looking for might be stored on the volume. By configuring the Spot instance to leave EBS volumes behind if the instance is terminated, you can attach the volume to another instance and attempt to recover data stored on the volume. When creating a Spot request, clear the Delete check box for EBS volumes you want to be kept if the instance is terminated. For instructions for attaching a volume to a new instance, see Attaching an Amazon EBS Volume to an Instance.
  • Did you take regular snapshots of any volumes attached to your Spot instance? Check the Snapshots pane of the Amazon EC2 console for snapshots of volumes that were attached to your instance. These snapshots, normally used as backups for EBS volumes, might contain the data you’re looking for. For more information, see Restoring an Amazon EBS Volume from a Snapshot.
  • Was the data being added or backed up to another source? Common output sources for workflows that run through Spot instances include Amazon S3, DynamoDB, and Amazon RDS. If you set your Spot instance to send output to one of these services, check those services for the data you’re looking for.

In the future, it’s best practice to prepare for a Spot instance’s termination ahead of time. For information about how to effectively prepare for a Spot instance’s eventual termination, see Spot Instance Interruptions.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center.

Published: 2016-06-15

Updated: 2017-06-01