You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Amazon Elastic Block Store (EBS) provides persistent block-level storage volumes for EC2 instances. If S3 is like a warehouse of objects, EBS is like a hard drive attached to your server — fast, low-latency, and designed for workloads that need frequent read/write operations.
Block storage divides data into fixed-size chunks called blocks. Each block has an address, and the operating system can read and write individual blocks directly. This is how traditional hard drives and SSDs work.
| Characteristic | Block Storage (EBS) | Object Storage (S3) |
|---|---|---|
| Data model | Fixed-size blocks | Complete objects (file + metadata) |
| Access | Mounted as a volume | HTTP API |
| Latency | Sub-millisecond | Milliseconds |
| Use case | Databases, boot volumes, applications | Backups, media, data lakes |
| Modification | Change individual blocks | Must re-upload entire object |
An EBS volume is a virtual disk that you attach to an EC2 instance. Key characteristics:
An EBS snapshot is a point-in-time backup of a volume, stored in S3 (managed by AWS). Snapshots are:
# Create a snapshot
aws ec2 create-snapshot --volume-id vol-0123456789abcdef0 --description "Daily backup"
# Create a volume from a snapshot
aws ec2 create-volume --snapshot-id snap-0123456789abcdef0 --availability-zone eu-west-2a --volume-type gp3
EBS offers four main volume types, divided into two categories: SSD-backed (for transactional workloads) and HDD-backed (for throughput-intensive workloads).
| Type | Name | Max IOPS | Max Throughput | Use Case |
|---|---|---|---|---|
| gp3 | General Purpose SSD | 16,000 | 1,000 MB/s | Boot volumes, dev/test, general workloads |
| gp2 | General Purpose SSD | 16,000 | 250 MB/s | Legacy general purpose (gp3 recommended) |
| io2 Block Express | Provisioned IOPS SSD | 256,000 | 4,000 MB/s | Mission-critical databases (SAP HANA, Oracle) |
| io2 | Provisioned IOPS SSD | 64,000 | 1,000 MB/s | Databases needing sustained high IOPS |
| io1 | Provisioned IOPS SSD | 64,000 | 1,000 MB/s | Legacy provisioned IOPS (io2 recommended) |
| Type | Name | Max IOPS | Max Throughput | Use Case |
|---|---|---|---|---|
| st1 | Throughput Optimised HDD | 500 | 500 MB/s | Big data, log processing, data warehousing |
| sc1 | Cold HDD | 250 | 250 MB/s | Infrequent access, lowest cost |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.