AWS Certified Cloud Practitioner / EC2 Instance Storage

EBS Hands On

πŸ”Ή 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:

  1. Volumes β†’ Create Volume

  2. Pick a type (e.g. gp3/gp2)

  3. Set a size (e.g. 2 GB)

  1. Match the AZ to your instance

  1. Create Volume

Attach:

  1. Select the new volume

  2. Actions β†’ Attach Volume

  1. Choose the running instance β†’ confirm

  2. 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-1a won't even appear as an option when attaching to an instance in ap-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