In context of AWS storage, what is the difference between instance storage and EBS root volume?
Going through AWS documentation:
By default, the root EBS volume that is created and attached to an instance at launch is deleted when that instance is terminated.
Instance store too is ephemeral.
So whats the difference?
And which one is default storage when an ec2 instance is launched?
2
Answers
In AWS, when you launch an EC2 instance, you have two types of storage options: instance storage and EBS volumes.
Instance storage is temporary storage directly attached to the host machine. It’s often referred to as ephemeral storage because data is lost when the instance stops or is terminated. You cannot add or remove instance store volumes after launching the instance. If you want to use instance storage, you must select an EC2 instance type that supports it and specify the desired configuration during the instance launch process.
EBS (Elastic Block Store) volumes, on the other hand, provide persistent storage. They are network-attached and do retain data even when the instance is stopped or terminated. By default, the root EBS volume that is created and attached to an EC2 instance at launch is set to be deleted when the instance is terminated. However, this behavior can be modified. You can change the Delete on Termination attribute of the root EBS volume to false if you want to retain the volume after the instance is terminated. You can also attach additional EBS volumes either during the launch or later when the instance is running. I find EBS volumes very useful as they offer more flexibility since you can attach and detach them as needed.
Hope this explanation helps.
This might be a good post to clear your doubts: Instance store vs EBS
terminations.
Instance store volumes are only supported by few instance types. Refer: Instance store volumes
Once you select instance from above instance types, you can see the instance store volume that comes with it in storage configuration.