02 / 11

What is an EBS volume?

An EBS volume is a block-level storage device that you can attach to an EC2 instance. It behaves like a raw, unformatted block device that you can format with a file system and use like a physical hard drive. EBS volumes are created within a specific Availability Zone and can be dynamically attached or detached from instances.

An EBS volume is the fundamental storage unit in Amazon EBS. When you create an EBS volume, you specify its type, size (in GiB), and the Availability Zone. Once attached to an EC2 instance, it appears as a block device (e.g., /dev/xvdf on Linux or D:\ on Windows) that you can partition, format, and mount. A single EBS volume can only be attached to one EC2 instance at a time (except io1/io2 with Multi-Attach), but one EC2 instance can have multiple EBS volumes attached simultaneously.

Key Properties of an EBS Volume
  1. 1

    Size — ranges from 1 GiB to 64 TiB depending on the volume type

  2. 2

    Volume Type — gp2, gp3, io1, io2, st1, sc1 (each optimized for different workloads)

  3. 3

    IOPS (Input/Output Operations Per Second) — determines how fast data can be read or written

  4. 4

    Throughput — measured in MiB/s, determines how much data can be transferred per second

  5. 5

    Availability Zone — volumes are AZ-specific and cannot be directly attached to instances in another AZ

  6. 6

    Encryption — optional AES-256 encryption using AWS KMS

  7. 7

    Snapshot ID — if created from a snapshot, the volume is pre-populated with that snapshot's data

Creating and Attaching an EBS Volume via AWS CLI
Important Behavioral Notes
  1. 1

    An EBS volume can only be attached to an EC2 instance in the SAME Availability Zone

  2. 2

    To move a volume to another AZ or Region, take a snapshot and create a new volume from it in the target AZ

  3. 3

    The root EBS volume is automatically attached at launch and usually deleted on termination

  4. 4

    Additional (data) EBS volumes are NOT deleted on termination by default

  5. 5

    You can resize (increase) an EBS volume while it is attached and in use — no downtime needed

  6. 6

    After resizing, you must extend the file system inside the OS to use the new space