EC2 instances provisioned outside of the AWS Auto Scaling Groups (ASGs) should have Termination Protection safety feature enabled in order to protect your instances from being accidentally terminated.
1. Sign in to the AWS Management Console.
2. Navigate to EC2 dashboard.
3. In the left navigation panel, under INSTANCES section, choose Instances.
4. Select the EC2 instance that you want to protect against accidental termination.
5. Click on the Actions dropdown button from the dashboard top menu, select Instance Settings and click Change Shutdown Behavior.
6. In the Change Shutdown Behavior dialog box, select Stop from the Shutdown behavior dropdown list and click Apply to apply the changes.
7. Click again on the same Actions dropdown button, select Instance Settings and click Change Termination Protection.
8. In the Enable Termination Protection dialog box, review the feature status and click Yes, Enable to confirm the action and turn on the feature. The Termination Protection status should change now from False to True.