In this article
Many people assume data from a lost EC2 instance is gone for good. After more than a year of running websites on EC2, we found that recovery is usually possible, because the instance's EBS volume often still exists.
Key takeaways
- Every EC2 instance has an EBS volume, and it often survives a failure.
- Launch a new instance in the same Availability Zone and attach the old volume.
- Take a snapshot first so you can always go back.
- Avoid Auto Scaling settings that can remove your only instance.
Is data recovery possible?
Yes, in many cases. The key is that the volume, not the instance, holds your data.
Why instances get lost
Sudden instance failure
A running instance can fail with no apparent reason, with both health checks failing. In that situation the same instance often cannot be brought back, and AWS support may not be able to revive it either.
Auto Scaling Group misconfiguration
When you create an Auto Scaling Group you set Max, Min and Desired capacity. If the minimum or desired count is 0, a scale-in event can remove your instance.
The concept: EBS volumes persist
Every EC2 instance has an attached EBS volume. When an instance is lost or corrupted, the volume usually still exists. Think of a computer that is switched off while its hard drive stays intact. Volumes set to delete on termination are the exception, so check that setting.
Steps to recover the data
- Take a snapshot of the old volume as a safety copy.
- Create a new instance in the same Availability Zone as the old volume.
- Stop the new instance right after it launches.
- Detach the new instance's root volume. It is a blank drive you do not need.
- Find the old volume. If there are several, use the creation date to pick the right one.
- Attach the old volume to the new instance.
- Set the old volume as the root device, using /dev/xvda or /dev/sda1. Otherwise the instance will not start.
- Start the instance. It should boot with your old data.
Prevent it next time
- Enable regular EBS snapshots or AWS Backup.
- Review Auto Scaling Group minimum and desired counts.
- Set termination protection on important instances.
Need help with cloud hosting, backups and support? See our hosting and server support services.
Frequently asked questions
Can I recover data if the volume was deleted?
Only if you have a snapshot or backup. Without one, a deleted volume cannot be recovered.
Does the new instance have to be in the same zone?
Yes. An EBS volume can be attached only to an instance in the same Availability Zone.



