πΉ Working with EBS Volumes on EC2
How EBS volumes attach to EC2 instances, and how they behave around AZs and termination.
π Viewing Attached Volumes
EC2 console β select instance β Storage tab
Shows root device name + attached block devices + volume monitoring

Click a volume (Block Devices) or Elastic Block Storage β Volumes to jump to the Volumes interface

There you can see its status, AZ, and attachment info

2οΈβ£ Creating & Attaching a New Volume
Create:

Volumes β Create Volume
Pick a type (e.g. gp3/gp2)
Set a size (e.g. 2 GB)

Match the AZ to your instance

Create Volume

Attach:
Select the new volume
Actions β Attach Volume

Choose the running instance β confirm
Instance now shows both volumes under Storage β Block Devices

π‘ One instance can have multiple volumes. One volume can attach to only one instance at a time β unless you use EBS Multi-Attach (out of scope for Cloud Practitioner).
β Availability Zone Restriction
A volume is locked to the AZ it was created in
A volume in
ap-south-1awon't even appear as an option when attaching to an instance inap-south-1b
Cleanup: delete the test volume created above.

β Delete on Termination
π₯ In these videos, we check each attached volume's Delete on Termination setting β root defaults to yes, additional defaults to no. The same recording also shows setting the root volume's flag to no during instance creation.
Volume | Default | Behavior on termination |
|---|---|---|
Root | β Yes | Deleted automatically |
Additional | β No | Persists |
Editable at launch under Advanced β Storage
Useful when you want the root volume kept for backup/testing
ποΈ Terminating an Instance
In the video, deleting the instance removes the root volume β only the external volume (previously attached to it) remains.
Root (Delete on Termination = Yes) β gone
Additional (Delete on Termination = No) β stays available
Example: 8 GB root β deleted Β· 2 GB additional β persists π₯ Untitled design (1).mp4