How to disable Termination Protection on an EC2 Instance

From AWS Management Console

Login to AWS Management Console and navigate to EC2 dashboard. Search for the instance that you would like to modify and right click on the instance. Select ‘Change Termination Protection’ under ‘Instance Settings’.

On the ‘Disable Termination Protection’ window, confirm by choosing ‘Yes, Disable’.



From AWS Command Line Interface (CLI)

To disable termination protection from AWS CLI, run the following command where INSTANCEID is the instance id of the EC2 Instance.

aws ec2 modify-instance-attribute --no-disable-api-termination --instance-id INSTANCEID

Below is the command to disable termination protection using AWS CLI for multiple instances.

aws ec2 modify-instance-attribute --no-disable-api-termination --instance-id INSTANCEID1 INSTANCEID2 INSTANCEID3

See also  How to modify "Delete on Termination" attribute of an EC2 Instance from AWS CLI