AWS EBS Volumes Explained: Types, Pricing & Use Cases
Amazon EBS (Elastic Block Store) is persistent block storage for EC2 instances. It works like a virtual hard drive attached to a virtual machine, storing the operating system, application files, and databases. The data survives instance stops, reboots, and replacements.
Every EC2 instance that boots from a persistent disk uses an EBS volume as its root volume. You can also attach additional EBS volumes to store application data, database files, or logs separately from the OS. EBS is the right choice for any workload that needs low-latency block storage attached to a single instance.
If you need to store files shared across multiple instances, consider EFS. If you need object storage for backups, static assets, or data lakes, use S3. EBS is specifically designed for single-instance, low-latency block access.
Simple explanation
An EBS volume is a persistent virtual hard drive for an EC2 instance. It lives in AWS’s storage infrastructure, connects to your instance over a high-speed network, and behaves exactly like a physical disk. You partition it, format it, mount it, read from it, and write to it.
The key word is persistent. When you shut down a physical computer, the hard drive keeps all your data. EBS works the same way. Stop your EC2 instance and the EBS volume stays exactly as you left it. Start the instance again and everything is still there.
Analogy
Think of an EBS volume like a USB hard drive. You plug it into a computer (EC2 instance), use it to store files and run software, and the data stays on the drive when you unplug it. You can move it to a different computer later. The drive does not care what computer it is attached to. It just stores your data reliably.
The real difference from a USB drive: EBS is network-attached, not physically inserted. AWS handles the hardware, redundancy, and durability behind the scenes.
How EBS works
Network-attached block storage
Unlike the physical SSD inside a laptop, EBS volumes live in AWS’s storage infrastructure and connect to your EC2 instance over a dedicated high-speed network. From the instance’s perspective, it looks like a local disk. Underneath, AWS handles replication, durability, and hardware failures automatically.
Same-AZ requirement
EBS volumes are tied to a specific Availability Zone. A volume in us-east-1a can only attach to instances running in us-east-1a. If you need to move a volume’s data to a different AZ, create a snapshot first, then restore it in the target AZ.
Root volumes and data volumes
When you launch an EC2 instance, it boots from a root volume: an EBS volume that holds the operating system. You can also attach additional data volumes to store application data, logs, or database files separately from the OS. Keeping data on a separate volume makes it easier to resize, replace, or recover individual components.
Persistence across stop and start
Stopping an EC2 instance does not touch its EBS volumes. All data is preserved. The root volume stays attached and reattaches automatically when the instance restarts. This is different from instance store volumes, which are physically local to the host and wiped when the instance stops.
Detach and reattach
EBS volumes exist independently of any particular EC2 instance. You can detach a volume from one instance, attach it to a different instance in the same AZ, and read the same data. This is useful for migrating data between instances, recovering a broken system, or cloning a disk for troubleshooting.
Snapshots as the backup path
The standard backup mechanism for EBS is EBS snapshots. A snapshot captures the state of a volume at a point in time and stores it in S3. Snapshots are incremental: only changed blocks are stored after the first one, so they are cost-efficient. You can restore a volume from a snapshot in any AZ within the same region, or copy it to another region for disaster recovery.
When to use EBS
EBS is the right storage choice in the following situations:
- EC2 boot volumes. Every EC2 instance launched from an AMI uses an EBS root volume by default. This is the most common EBS use case.
- Relational databases on EC2. MySQL, PostgreSQL, Oracle, and SQL Server all need fast, consistent block storage with low latency. EBS with gp3 or io2 provides this.
- App servers with local state. Applications that write session data, cache files, or temporary state to disk benefit from EBS’s predictable performance.
- Persistent data disks for EC2 workloads. Any data that needs to outlive the lifecycle of a particular instance (logs, uploads, generated files) belongs on a persistent EBS volume rather than instance store.
- Workloads needing low-latency block access. EBS delivers single-digit millisecond latency for SSD volume types, which is appropriate for most transactional workloads.
If you are launching your first EC2 instance, the default 8 GB gp3 root volume is a reasonable starting point for most purposes.
When not to use EBS
EBS is the wrong tool in some situations:
- Object storage. If you are storing static files, media, backups, or data lake content that does not need to be mounted as a filesystem, use S3. S3 is cheaper per GB and scales without pre-provisioning.
- Shared file access across multiple instances. EBS attaches to one instance at a time. If multiple instances need concurrent access to the same files over NFS, use EFS. See the S3 vs EFS comparison for guidance on choosing between object and file storage.
- Ephemeral scratch space. For temporary high-speed scratch data (caches, buffers, intermediate computation), instance store volumes are faster because they are physically attached to the host. If you do not need the data to persist, instance store avoids the EBS network overhead.
- Long-term cold archives. S3 Glacier is significantly cheaper than EBS for data you rarely access. Do not pay for provisioned EBS storage to hold data that only needs to be retrieved occasionally.
EBS vs other storage options
AWS offers several storage services with different trade-offs. Here is how EBS compares to the most common alternatives:
| Storage option | Best for | Shared across instances | Persistence | Typical use case |
|---|---|---|---|---|
| EBS | Single-instance block storage, databases, boot volumes | No (io2 multi-attach is a narrow exception) | Persistent. Survives instance stop. | Boot disk, MySQL data dir, app server files |
| Instance store | High-speed ephemeral scratch storage | No | Lost on instance stop or termination | Temp cache, shuffle space, buffers |
| EFS | Shared POSIX filesystem across many instances | Yes. NFS access from many instances. | Persistent | Shared app configs, CMS uploads, home directories |
| S3 | Object storage at any scale | Yes. Accessible from anywhere. | Persistent | Static files, backups, data lake, media storage |
EBS vs instance store
Instance store is physically attached to the host server. It is faster than EBS for some workloads because there is no network in the path. The trade-off: instance store is ephemeral. When the instance stops or terminates, all data is gone. EBS persists independently. For most production workloads, EBS is the right choice because persistence matters more than the small latency advantage of local storage.
Instance store is like RAM in a calculator: blazing fast, but everything disappears when the power goes off. EBS is like the calculator’s memory storage: a bit slower to access, but the numbers are still there when you turn it back on.
EBS vs EFS
EFS is a managed NFS filesystem that can be mounted by many EC2 instances simultaneously. EBS attaches to one instance at a time. If your workload needs a single instance with fast block storage, use EBS. If multiple instances need to read and write the same files concurrently, EFS is the appropriate choice, though at a higher cost per GB.
EBS vs S3
S3 is object storage, not block storage. You cannot mount S3 as a filesystem and have your application write to it like a disk. S3 uses an HTTP-based API for storing and retrieving objects. EBS works at the block level, so it is appropriate wherever a traditional disk is needed. S3 is significantly cheaper and scales without pre-provisioning, making it the better choice for blobs, backups, and static content.
EBS volume types
AWS offers two categories of EBS volumes: SSD-backed (optimised for IOPS) and HDD-backed (optimised for throughput at lower cost). Within each category there are current and previous-generation options.
| Volume type | Best for | Boot volume | Max IOPS | Max throughput | Cost level |
|---|---|---|---|---|---|
| gp3 | Most workloads. The default. | Yes | 16,000 | 1,000 MB/s | $ |
| gp2 | Legacy. Migrate to gp3. | Yes | 16,000 | 250 MB/s | $$ (more than gp3) |
| io2 / io2 Block Express | High-IOPS databases with strict performance requirements | Yes | 64,000 / 256,000 | 1,000 / 4,000 MB/s | $$$ |
| io1 | Legacy provisioned IOPS. Migrate to io2. | Yes | 64,000 | 1,000 MB/s | $$$ |
| st1 | Large sequential reads/writes (big data, logs) | No | 500 | 500 MB/s | $ (low) |
| sc1 | Infrequently accessed cold data | No | 250 | 250 MB/s | Very low |
gp3 (General Purpose SSD, current generation)
gp3 is the standard choice for most workloads. Unlike gp2, the baseline of 3,000 IOPS and 125 MB/s throughput is independent of volume size. A 1 GB gp3 volume gets the same baseline as a 16 TB volume. You can provision additional IOPS (up to 16,000) and throughput (up to 1,000 MB/s) independently, only paying for what you need. gp3 is approximately 20% cheaper than gp2.
Use gp3 for: boot volumes, most databases, web and app servers, development environments, and any workload that does not genuinely need more than 16,000 IOPS.
gp2 (General Purpose SSD, previous generation)
gp2 ties IOPS to volume size at 3 IOPS per GB, with a burst mechanism for smaller volumes. A 100 GB gp2 volume gets 300 baseline IOPS. To reach 3,000 IOPS on gp2, you needed a 1,000 GB volume, paying for unused space to hit a performance target. gp3 removed this limitation entirely. gp2 volumes are more expensive than equivalent gp3 configurations. Migrate existing gp2 volumes to gp3.
io2 and io2 Block Express (Provisioned IOPS SSD)
io2 is designed for I/O-intensive workloads that need consistent, high IOPS beyond what gp3 can provide: large relational databases running on EC2 (Oracle, SQL Server, large MySQL or PostgreSQL instances), SAP HANA, and other latency-sensitive workloads.
- io2: up to 64,000 IOPS and 1,000 MB/s throughput, 99.999% durability
- io2 Block Express: up to 256,000 IOPS and 4,000 MB/s throughput, sub-millisecond latency
- Multi-attach: io2 Block Express supports attaching to up to 16 instances simultaneously (same AZ, Linux, cluster-aware filesystem required)
io2 is significantly more expensive than gp3. Only use it when you have a measured, verified IOPS requirement that exceeds gp3’s 16,000 IOPS ceiling. Many teams over-provision io2 out of caution. It is worth benchmarking your workload on gp3 first.
io1 (Provisioned IOPS SSD, previous generation)
io1 is the predecessor to io2. io2 delivers higher durability (99.999% vs 99.8-99.9%) at the same price point. If you have io1 volumes, evaluate migrating to io2.
st1 (Throughput Optimised HDD)
st1 is designed for large sequential workloads where you read and write big blocks of data in order, not random access. It delivers up to 500 MB/s throughput at a much lower cost per GB than SSD volumes. It cannot be used as a boot volume.
Use st1 for: Hadoop/HDFS data nodes, Kafka log storage, video processing pipelines, data warehouse staging areas accessed sequentially. Minimum size is 125 GB.
sc1 (Cold HDD)
sc1 is the lowest-cost EBS option, designed for data that is accessed infrequently. It delivers up to 250 MB/s throughput at a lower price than st1, but it is not appropriate for workloads that need regular, fast access. It cannot be used as a boot volume. Minimum size is 125 GB.
Use sc1 for: cold archives, compliance data that must stay on block storage, infrequently accessed logs.
HDD volumes (st1 and sc1) cannot be used as root volumes. If you need a boot disk, use gp3 or io2. HDD volumes can only be attached as additional data volumes.
Which EBS volume type should I choose?
- Default to gp3. It is the right choice for the large majority of EC2 workloads: boot volumes, web servers, app servers, and most databases.
- Choose io2 only after measuring. If your database is genuinely bottlenecked on IOPS and gp3 at 16,000 IOPS is not enough, move to io2. Do not use io2 speculatively.
- Choose io2 Block Express for the most demanding databases. Oracle RAC, SAP HANA, or any workload requiring sub-millisecond latency or more than 64,000 IOPS.
- Choose st1 for large, sequential, cost-sensitive workloads. Hadoop clusters, Kafka, log aggregation, and streaming pipelines that read data sequentially benefit from st1’s throughput and lower cost.
- Choose sc1 only for rarely accessed data. If the data is accessed maybe once a month and cost is the primary driver, sc1 is appropriate. Otherwise st1 or gp3 will serve you better.
- Never create new gp2 or io1 volumes. These are legacy types. gp3 and io2 are better in every dimension at equal or lower cost.
When in doubt, use gp3. It is cheaper than gp2, has a flat 3,000 IOPS baseline regardless of size, and handles the vast majority of real-world EC2 workloads without any tuning. Reach for io2 only once you have measured a genuine bottleneck.
Attaching, mounting, and resizing
The typical flow for adding an EBS data volume to a running instance: create it in the same AZ, attach it, format and mount it inside the instance, then make the mount persistent.
Create a 50 GB gp3 volume in the same AZ as your instance:
aws ec2 create-volume \
--size 50 \
--volume-type gp3 \
--availability-zone us-east-1a \
--tag-specifications 'ResourceType=volume,Tags=[{Key=Name,Value=my-data-volume}]'Wait for the volume to become available, then attach it:
aws ec2 wait volume-available --volume-ids vol-0abc12345def67890
aws ec2 attach-volume \
--volume-id vol-0abc12345def67890 \
--instance-id i-0abc12345def67890 \
--device /dev/sdfOn Nitro-based EC2 instance types (most modern instance families), devices appear as NVMe devices inside the OS regardless of the device name you specify at attach time. The device you attached as /dev/sdf will typically appear as /dev/nvme1n1 inside the instance. Use lsblk to confirm the actual device name before formatting.
Inside the instance, format and mount the new volume:
# Confirm the device name
lsblk
# Format with ext4 (only on a new, empty volume)
sudo mkfs -t ext4 /dev/nvme1n1
# Create the mount point and mount
sudo mkdir /data
sudo mount /dev/nvme1n1 /data
# Verify
df -h /dataTo make the mount persist across reboots, add it to /etc/fstab using the UUID rather than the device name:
# Get the UUID
sudo blkid /dev/nvme1n1
# Add to /etc/fstab (replace <your-uuid> with the UUID from blkid)
echo 'UUID=<your-uuid> /data ext4 defaults,nofail 0 2' | sudo tee -a /etc/fstabTo detach a volume (it must be unmounted first):
# Inside the instance
sudo umount /data
# Via the CLI
aws ec2 detach-volume --volume-id vol-0abc12345def67890Resizing a volume without downtime
EBS Elastic Volumes lets you increase a volume’s size, change its type, or adjust provisioned IOPS while it is attached to a running instance. No reboot required.
# Increase size from 50 GB to 100 GB
aws ec2 modify-volume \
--volume-id vol-0abc12345def67890 \
--size 100
# Or change type from gp2 to gp3 live
aws ec2 modify-volume \
--volume-id vol-0abc12345def67890 \
--volume-type gp3After the volume modification completes, extend the filesystem inside the instance. The volume is larger, but the filesystem does not know that yet.
# Grow the partition (if the volume has a partition table)
sudo growpart /dev/nvme1n1 1
# Extend the ext4 filesystem to fill the new space
sudo resize2fs /dev/nvme1n1p1Always take an EBS snapshot before resizing a volume or changing its type. Volume modifications are usually reversible, but a snapshot gives you a clean recovery path if something goes wrong.
EBS pricing
EBS pricing has several components and they vary by region and volume type. Check the AWS EBS pricing page for current figures in your region. The model works as follows:
- Storage (per GB-month): The base charge for provisioned capacity. gp3 is cheaper than gp2 per GB. HDD volumes (st1, sc1) are cheaper than SSD per GB. io2 charges more per GB than gp3.
- Provisioned IOPS: For gp3, the first 3,000 IOPS are included in the storage price. Additional provisioned IOPS cost extra. For io2, all provisioned IOPS are charged. For st1 and sc1, there is no separate IOPS charge.
- Throughput (gp3 only): The first 125 MB/s is included. Additional provisioned throughput up to 1,000 MB/s costs extra.
- Snapshots: Stored in S3 and billed separately at a per GB-month rate. Snapshots are incremental after the first, so ongoing costs are typically well below the full volume size. See the EBS snapshots guide for details.
EBS volumes accrue charges whether or not the attached EC2 instance is running. A stopped instance still pays for its EBS storage. If you stop an instance for an extended period, consider taking a snapshot and deleting the volume. You can restore it from the snapshot when needed.
Common EBS cost mistakes
- Orphaned unattached volumes. When you terminate an EC2 instance, its additional data volumes are not deleted by default. They remain as unattached volumes accumulating charges. Audit for unattached volumes regularly. The cleaning up unused resources guide covers this.
- Overprovisioned io2. io2 with provisioned IOPS is expensive. If you provisioned for peak load and the workload is consistently well below that ceiling, you are paying for unused performance. Measure actual IOPS and right-size accordingly.
- Not migrating gp2 to gp3. gp2 costs more per GB than gp3 and delivers worse performance at small sizes. There is no downside to migrating. This is one of the easiest wins in EC2 cost optimisation.
- Snapshot sprawl. If you run automated snapshots without a retention policy, old snapshots accumulate indefinitely. Use EBS snapshot lifecycle policies to expire old snapshots automatically.
Common mistakes
- Creating a volume in the wrong AZ. An EBS volume can only attach to instances in the same Availability Zone. If you create a volume in
us-east-1abut your instance is inus-east-1b, the attach will fail. Check the AZ before creating volumes. - Using gp2 instead of gp3. gp3 is cheaper and more flexible. There is no reason to create new gp2 volumes. If you have existing gp2 volumes, migrate them to gp3. It is a live operation that does not require downtime.
- Skipping snapshots before risky operations. Before resizing a volume, changing its type, or making significant OS-level changes, take a snapshot. Snapshots are cheap insurance. A modification that goes wrong can leave a volume in an unrecoverable state without one.
- Misunderstanding multi-attach. Standard EBS volumes attach to one instance at a time. Multi-attach requires io2 Block Express, is limited to a single AZ, requires Linux, and requires a cluster-aware filesystem. If you need shared file access across instances, EFS is a more straightforward answer.
- Leaving unused volumes attached or unattached. Both states cost money. Attached volumes that are no longer needed waste storage charges. Unattached orphan volumes from terminated instances are a common source of unexpected bills. Review your volumes periodically.
- Treating EBS like shared storage. EBS volumes are designed for single-instance block access. They are not a substitute for EFS (shared filesystem) or S3 (object storage). Multiple instances writing to the same EBS volume with a standard filesystem will cause data corruption.
If you enable multi-attach on an io2 Block Express volume and mount it on multiple instances using a standard filesystem like ext4 or XFS, you will corrupt the data. Multi-attach requires a cluster-aware filesystem (such as GFS2 or OCFS2) or an application that explicitly manages concurrent write access. This is an advanced use case. Most teams using multi-attach should be running a managed clustering solution.
Summary
- EBS provides persistent, network-attached block storage for EC2 instances. Data survives instance stops and reboots.
- gp3 is the right default for most workloads. It is cheaper than gp2 with better performance at all sizes.
- io2 is for high-IOPS workloads that need more than 16,000 IOPS or 99.999% durability. Use it only when gp3 is a proven bottleneck.
- st1 and sc1 are low-cost HDD options for sequential or cold workloads. Neither can be used as a root volume.
- EBS volumes must be in the same AZ as the instance they attach to.
- EBS Elastic Volumes lets you resize and change volume types without downtime.
- EBS charges continue when the instance is stopped. Orphaned unattached volumes also accrue charges.
Frequently asked questions
What is an EBS volume?
Amazon EBS (Elastic Block Store) is a persistent block storage service for EC2 instances. It works like a virtual hard drive: you attach it to an instance, and the data survives stops, reboots, and even instance replacements. When you stop an EC2 instance, the root EBS volume stays intact and is ready when the instance starts again.
What is the difference between gp2 and gp3?
gp3 is the current generation and is almost always better. gp3 gives you a flat baseline of 3,000 IOPS and 125 MB/s throughput regardless of volume size. gp2 ties IOPS to volume size at 3 IOPS per GB, so a small gp2 volume gets very few IOPS. gp3 is also around 20% cheaper. There is no reason to create new gp2 volumes, and existing gp2 volumes are worth migrating.
Can I attach one EBS volume to multiple EC2 instances?
Standard EBS volumes attach to one EC2 instance at a time. Multi-attach is only supported on io2 Block Express volumes, and only within a single Availability Zone, using Linux instances with cluster-aware filesystems. Standard filesystems like ext4 and XFS will corrupt data if used with multi-attach.
What happens to EBS data when an EC2 instance stops or terminates?
Stopping an instance leaves EBS volumes unchanged. All data is preserved and the volume reattaches when the instance restarts. Terminating an instance deletes the root EBS volume by default (controlled by the DeleteOnTermination setting). Additional data volumes are kept by default unless you explicitly set DeleteOnTermination on them too.
When should I use EBS instead of S3 or EFS?
Use EBS when your application needs block-level storage attached to a single EC2 instance: boot volumes, databases, app servers with local data. Use S3 for object storage like files, backups, or static assets that do not need to be mounted as a filesystem. Use EFS when multiple EC2 instances need shared access to the same files over NFS. EBS is faster and lower-latency than both for single-instance workloads.