Select Language:
When it comes to deleting Amazon Elastic Block Store (EBS) volumes when your EC2 instances are terminated, the process depends on the type of volume you’re using.
For the root EBS volumes – the main storage that contains your operating system and application files – the default setting is “Delete on Termination” set to true. This means that when you shut down or terminate your EC2 instance, the root volume will automatically be deleted. This setup helps save you money and keeps things simple by cleaning up resources you no longer need, since most users don’t require preserving the OS and system files after shutting down the instance.
On the other hand, if you attach additional EBS data volumes to your EC2 instance during setup, the default is “Delete on Termination” set to false. These extra storage volumes typically hold your important data, and by default, they are preserved even after the instance ends. This is because keeping data volumes intact ensures your data stays safe and accessible, aligning with the goal of EBS to provide persistent storage.
If you wish to keep your root volume after terminating the instance, you can change this setting from true to false. This can be done either when launching the instance or later on through the console or API. Doing so allows you to keep any important data stored on the root volume, giving you more control over your resources.
For your data volumes, AWS already defaults to preserving them, recognizing the value of maintaining data even when the instance is no longer running.
This default behavior is designed to help you manage costs and avoid storing unnecessary volumes. If you want to delete data volumes that are no longer in use, you can do so manually to prevent unwanted charges.
By understanding how “Delete on Termination” works for your EBS volumes, you can better plan your storage needs and prevent accidental data loss or unnecessary costs.




