Help us improve the AWS re:Post Knowledge Center by sharing your feedback in a brief survey. Your input can influence how we create and update our content to better support your AWS journey.
How do I protect my data against accidental Amazon EC2 instance termination?
2 minute read
0
I want to know how to protect my data against accidental Amazon Elastic Compute Cloud (Amazon EC2) instance termination. I also want to troubleshoot and collect more information about probable termination causes and behaviors.
Resolution
Activate termination protection
Termination protection prevents an EC2 instance from accidental termination. By default, Amazon EC2 deactivates this option for instances. To protect your instance from unintentional termination, activate termination protection.
Create an Amazon Machine Image (AMI) to capture the data on all the Amazon EBS volumes that you attached to the instance. You can also use the AMI to launch a new instance.
Recreate your instance or restore data from a terminated instance