Skip to content

understand the behavior of root Amazon EBS

0

Hi AWS Community,

I’m trying to understand the behavior of root Amazon EBS volumes when an EC2 instance is terminated. Does the root EBS volume get deleted automatically upon instance termination, or is it retained by default? Additionally, is there a setting to control this behavior, and if so, how can it be adjusted?

asked 2 years ago306 views

1 Answer
1
Accepted Answer

Hello.

By default, the root EBS volume will be deleted when EC2 is deleted.
If you want to prevent it from being deleted, you need to change the EBS settings.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-root-volume-delete-on-termination.html

By default, the Amazon EBS root volume for an instance is deleted when the instance terminates. You can change the default behavior to ensure that an Amazon EBS root volume persists after the instance terminates. To change the default behavior, set the DeleteOnTermination attribute to false. You can do so either at instance launch or later on.

You can configure it by following the steps described in the document below.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-root-volume-delete-on-termination.html#set-deleteOnTermination-aws-cli

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.