Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

Preventing The Deletion Of Amazon EBS Volumes

Do you want to avoid having your Amazon EBS volumes deleted? You can rely on us.

As part of our AWS Support Services, we at Skynats help customers with a variety of AWS inquiries.

Let’s see how our support technicians handle this problem.

How to prevent the deletion of Amazon EBS volumes?

The value of the DeleteOnTermination attribute for each attached EBS volume determines whether or not to keep the volume after an instance terminates.

The DeleteOnTermination attribute is by default set to False for all other volume types and to True for the root volume.

Change the root volume’s DeleteOnTermination attribute from True to False to prevent the root volume from being deleted when an instance terminates.

How can you launch a new instance with the DeleteOnTermination attribute set to False?

Let’s look at the steps our Support Techs took today to modify a console instance’s root volume so that it persists at launch.

  • First, go to to launch the Amazon EC2 console.
  • Next, choose Launch Instance from the console dashboard.
  • After that, select an AMI from the Choose an Amazon Machine Image (AMI) page.
  • The Configure Instance Details and Choose an Instance Type pages can be finished by following the wizard.
  • Deselect the Delete On Termination check box for the root volume on the Add Storage page.
  • Finish the last few wizard pages, and then select Launch.

By looking at the root device volume’s details in the instance’s details pane, you can confirm the setting.

Select the entry for the root device volume next to Block devices. Delete on termination is set to True by default.

Delete on termination is False if you alter the default behavior.

How do you set the DeleteOnTermination attribute on a running Instance to false?

If the instance is already running, you can use the command line to set DeleteOnTermination to False.

Use the command as follows:

aws ec2 modify-instance-attribute --instance-id i-1234567890abcdef0 --block-device-mappings file://mapping.json

Include the following in mapping.json:

"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": false

Are you looking for an answer to another query? Contact our technical support team.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Can't get what you are looking for?

Available 24x7 for emergency support.