Protect your data on Amazon EC2

Amazon tips&tricks - Enable Termination Protection

Some of us have to take care of many different servers. It is natural that we have also test servers that have to be terminated when not needed. That reduces the costs especially if we are using spot instances. Sometimes when you are tired and at the end of the shift, you want to terminate some unnecessary servers. You simply select the server, then right-click and terminate. Unfortunately for some of us it happened that we have selected the wrong server and terminated the working one... We are human beings and accidental server deletion might happen. That is why Amazon offers protection from accidental termination and it is for free. This short tutorial will guide you on how to use termination protection on Amazon EC2.

How to activate Termination Protection? 

1) Navigate to your instances dashboard




2) Right-click on the instance that you want to protect and choose "Change Termination Protection"

 

3) Confirm that you want to enable the feature



And it is done. You can be sure that now you won't accidentally delete your instance.


How does it work?

If you try to terminate the protected instance you will be prompted first to deactivate the terminate protection feature. You won't be able to click "Yes, Terminate" button unless you go back to point 2 and disable termination protection.




Sources

- https://aws.amazon.com/premiumsupport/knowledge-center/accidental-termination/

- https://aws.amazon.com/blogs/aws/new-console-features-forced-detach-termination-protection/

There are more tips&tricks to come on this blog. Stay tuned:)