Skip to main content

02. πŸ’Ύ EBS Volume

An EBS (Elastic Block Store) Volume is a network attached block storage that you can attach to your EC2 instances while they run. It allows data persistence even after the instance is stopped or terminated.


βš™οΈ Key Characteristics​

FeatureDescription
TypeNetwork-attached block storage (not physically attached)
PersistenceData persists beyond instance lifetime
MountingCan only be attached to one instance at a time (at the CCP level)
Availability Zone BoundVolumes are locked to a single AZ
PerformanceSlight latency since it communicates over the network
Provisioned CapacityBilled for allocated size (GBs) and IOPS
ScalabilityVolume size and IOPS can be increased over time

Preserve the root volume when an instance is terminated for troubleshooting or data recovery.

Detach and reattach EBS volumes across instances to retain or migrate data.


🧠 Analogy​

Think of an EBS Volume like a β€œnetwork USB stick”

You can attach it, detach it, and move it between compatible instances in the same Availability Zone.


πŸ” EBS Volume Mobility​

  • An EBS Volume in us-east-1a cannot be attached to an instance in us-east-1b.
  • To move it across AZs or Regions:
    1. Create a Snapshot of the volume.
    2. Restore that snapshot in another AZ or Region.

⚑ EBS – Delete on Termination Attribute​

SettingDefault BehaviorDescription
Root Volumeβœ… EnabledDeleted when the EC2 instance terminates
Additional Volumes❌ DisabledNot deleted automatically on termination

πŸ‘·β€β™‚οΈ Creating EBS Volume and Attaching It​

  1. Go to EC2 Dashboard β†’ Elastic Block Store β†’ Volumes.

  2. Click Create Volume β†’ choose size, type, and same AZ as your instance β†’ Create.

  3. Select the new volume β†’ Actions β†’ Attach Volume β†’ choose your instance β†’ Attach.