AWS AWSEC2 documentation change
Summary
Restructured documentation with new sections explaining EBS volume deletion behavior, added detailed default settings table, and expanded verification procedures
Security assessment
The changes clarify data persistence behavior but do not address a specific security vulnerability. While proper configuration prevents accidental data loss, this is a documentation improvement rather than a security fix.
Diff
diff --git a/AWSEC2/latest/UserGuide/preserving-volumes-on-termination.md b/AWSEC2/latest/UserGuide/preserving-volumes-on-termination.md index b494d5d3c..acc622da3 100644 --- a//AWSEC2/latest/UserGuide/preserving-volumes-on-termination.md +++ b//AWSEC2/latest/UserGuide/preserving-volumes-on-termination.md @@ -5 +5 @@ -Change the root volume to persist at launchChange the root volume of a running instance to persist +How instance termination affects root and data volumesDefault deletion behavior for EBS volumesCheck volume persistence settingsChange the root volume to persist at launchChange the root volume of a running instance to persist @@ -9 +9 @@ Change the root volume to persist at launchChange the root volume of a running i -Depending on your use case, you might want to preserve the data on your instance store volume or Amazon EBS volume when the Amazon EC2 instance is terminated. The data on an instance store volume doesn't persist when an instance is terminated. If you need to preserve the data stored on an instance store volume beyond the lifetime of the instance, you must manually copy that data to more persistent storage, such as an Amazon EBS volume, an Amazon S3 bucket, or an Amazon EFS file system. For more information, see [Storage options for your Amazon EC2 instances](./Storage.html). +When an Amazon EC2 instance is terminated, you can preserve the data on your instance store volumes or Amazon EBS volumes. This topic explains how to ensure your data persists beyond instance termination. @@ -11 +11 @@ Depending on your use case, you might want to preserve the data on your instance -For data on Amazon EBS volumes, Amazon EC2 uses the value of the `DeleteOnTermination` attribute for each attached Amazon EBS volume to determine whether to preserve or delete the volume. +## How instance termination affects root and data volumes @@ -13 +13 @@ For data on Amazon EBS volumes, Amazon EC2 uses the value of the `DeleteOnTermin -The default value for the `DeleteOnTermination` attribute differs depending on whether the volume is the root volume of the instance or a non-root volume attached to the instance. +###### Instance store volumes @@ -15 +15 @@ The default value for the `DeleteOnTermination` attribute differs depending on w -**Root volume** +When an instance is terminated, the instance store volumes are automatically deleted and the data is lost. To preserve this data beyond the lifetime of the instance, before terminating the instance, manually copy the data to persistent storage, such as an Amazon EBS volume, an Amazon S3 bucket, or an Amazon EFS file system. For more information, see [Storage options for your Amazon EC2 instances](./Storage.html). @@ -16,0 +17 @@ The default value for the `DeleteOnTermination` attribute differs depending on w +###### Amazon EBS volumes @@ -18 +19 @@ The default value for the `DeleteOnTermination` attribute differs depending on w -By default, when you launch an instance the `DeleteOnTermination` attribute for the root volume of an instance is set to `true`. Therefore, the default is to delete the root volume of the instance when the instance terminates. +When an instance is terminated, the EBS volumes are either deleted or preserved, depending on the value of the `DeleteOnTermination` attribute for each volume: @@ -20 +21 @@ By default, when you launch an instance the `DeleteOnTermination` attribute for -**Non-root volume** + * **Yes** (console) / `true` (CLI) – The volume is deleted when the instance is terminated. @@ -22,2 +23 @@ By default, when you launch an instance the `DeleteOnTermination` attribute for - -By default, when you attach a non-root EBS volume to an instance, its `DeleteOnTermination` attribute is set to `false`. Therefore, the default is to preserve these volumes. + * **No** (console) / `false` (CLI) – The volume is preserved when the instance is terminated. Preserved volumes continue to incur charges. @@ -27 +27,16 @@ By default, when you attach a non-root EBS volume to an instance, its `DeleteOnT -After the instance terminates, you can take a snapshot of the preserved volume or attach it to another instance. You must delete a volume to avoid incurring further charges. +After an instance terminates, you can take a snapshot of the preserved volume or attach it to another instance. To avoid incurring charges, you must delete the volume. + + + + +## Default deletion behavior for EBS volumes + +The default `DeleteOnTermination` value differs depending on the volume type, whether the volume was attached at launch or after, and the method (console or CLI) used to attach the volume: + +Volume type | Attached when | Method for attaching | Default behavior on instance termination +---|---|---|--- +Root volume | At launch | Console or CLI | Delete +Root volume | After launch | Console or CLI | Preserve +Data volume | At launch | Console | Preserve +Data volume | At launch | CLI | Delete +Data volume | After launch | Console and CLI | Preserve @@ -29 +44 @@ After the instance terminates, you can take a snapshot of the preserved volume o -The `DeleteOnTermination` attribute can be set by the creator of an AMI as well as by the person who launches an instance. When the attribute is changed by the creator of an AMI or by the person who launches an instance, the new setting overrides the original AMI default setting. We recommend that you verify the default setting for the `DeleteOnTermination` attribute after you launch an instance with an AMI. +## Check volume persistence settings @@ -31 +46 @@ The `DeleteOnTermination` attribute can be set by the creator of an AMI as well -To verify if an Amazon EBS volume will be deleted on instance termination, view the details for volume on the instance's details pane. On the **Storage** tab, under **Block devices** , scroll right to view the **Delete on termination** setting for the volume. +The default value at launch for an EBS volume is determined by the `DeleteOnTermination` attribute set on the AMI. You can change the value at instance launch, overriding the AMI setting. We recommend that you verify the default setting for the `DeleteOnTermination` attribute after you launch an instance. @@ -33 +48 @@ To verify if an Amazon EBS volume will be deleted on instance termination, view - * If **Yes** , the volume will be deleted when the instance is terminated. +###### To check if an Amazon EBS volume will be deleted on instance termination @@ -35 +50,13 @@ To verify if an Amazon EBS volume will be deleted on instance termination, view - * If **No** , the volume will not be deleted when the instance is terminated. Any volumes that are not deleted upon termination of the instance will continue to incur charges. + 1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/). + + 2. In the navigation pane, choose **Instances**. + + 3. Select the instance. + + 4. Choose the **Storage** tab. + + 5. Under **Block devices** , scroll right to check the **Delete on termination** column. + + * If **Yes** , the volume is deleted when the instance is terminated. + + * If **No** , the volume is not be deleted when the instance is terminated. Any volumes not deleted continue to incur charges. @@ -42 +69 @@ To verify if an Amazon EBS volume will be deleted on instance termination, view -You can change the `DeleteOnTermination` attribute of an EBS root volume when you launch an instance. +You can change the `DeleteOnTermination` attribute of an EBS root volume when you launch an instance. You can also use the following procedure for a data volume. @@ -51 +78,3 @@ Console - 2. On the **Configure storage** pane, choose **Advanced**. Under EBS volumes****, expand the information about the root volume. + 2. On the **Configure storage** pane, choose **Advanced**. + + 3. Under **EBS volumes** , expand the root volume information. @@ -53 +82 @@ Console - 3. For **Delete on termination** , choose **No**. + 4. For **Delete on termination** , choose **No**. @@ -55 +84 @@ Console - 4. In the **Summary** panel, review your instance configuration, and then choose **Launch instance**. For more information, see [Launch an EC2 instance using the launch instance wizard in the console](./ec2-launch-instance-wizard.html). + 5. In the **Summary** panel, review your instance configuration, and then choose **Launch instance**. For more information, see [Launch an EC2 instance using the launch instance wizard in the console](./ec2-launch-instance-wizard.html). @@ -107 +136 @@ In `bdm`, specify the device name, for example `/dev/sda1` or `/dev/xvda`, and f -You can change the EBS root volume of a running instance to persist. +You can change the EBS root volume of a running instance to persist. You can also use the following procedure for a data volume.