- Newest
- Most votes
- Most comments
The "Delete on Termination" behavior for EBS volumes actually varies depending on the volume type:
For root EBS volumes (the boot volume of your EC2 instance), "Delete on Termination" is set to true by default. This means that when you terminate an EC2 instance, its root volume will be automatically deleted.
For additional EBS data volumes that are attached during instance launch, "Delete on Termination" is set to false by default. These volumes will persist even after the instance is terminated.
The rationale behind deleting root volumes by default likely relates to cost management and resource cleanup. Since root volumes typically contain the operating system and application files rather than unique data, AWS assumes most users don't need to retain these volumes after instance termination. This default behavior helps prevent accumulating unused volumes that continue to incur charges.
If you want to preserve your root volume data after termination, you can explicitly change this setting by setting the DeleteOnTermination attribute to false either during instance launch or later on. This gives you the flexibility to keep important data while preventing unnecessary storage costs for volumes you don't need.
For your data volumes, AWS does recognize the importance of data persistence by making preservation the default behavior, aligning with the data persistence advantage of EBS that you mentioned.
Sources
understand the behavior of root Amazon EBS | AWS re:Post
Keep an Amazon EBS root volume after an Amazon EC2 instance terminates - Amazon Elastic Compute Cloud
Features and benefits of Amazon EBS volumes - Amazon EBS
How instance termination works - Amazon Elastic Compute Cloud
Delete unattached Amazon EBS volumes - AWS Prescriptive Guidance
Relevant content
asked 3 years ago
