Skip to content

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.

Regularly back up your data

Take one or more of the following actions:

Recreate your instance or restore data from a terminated instance

If you backed up your instances, then use the backup to restore the terminated instance.

Troubleshoot termination behaviors to identify the causes of termination

Configuration issues can cause your instance to terminate immediately on startup. To identify and troubleshoot termination causes, see Troubleshoot Amazon EC2 instance termination issues and Why did Amazon EC2 unexpectedly terminate my instance?

Related information

Best practices for Amazon EC2

AWS OFFICIALUpdated 2 months ago