Skip to content
intermediate Phase 4 · Storage Services

EBS Block Storage

Provision and manage EBS volumes, select volume types (gp3, io2, st1), create snapshots, and configure encryption for block-level storage.

50m
0 problems
Topic Progress 0%

EBS Volume Types

EBS provides block storage volumes that attach to EC2 instances as boot or data volumes.

gp3 (General Purpose SSD) is the default—3,000 IOPS and 125 MB/s baseline, scalable to 16,000 IOPS and 1,000 MB/s independently. Best price-performance for most workloads. gp2 is previous generation—3 IOPS per GB (min 100, max 16,000). Migrate to gp3 for better performance and cost.

io2 Block Express delivers sub-millisecond latency and up to 256,000 IOPS per volume—designed for mission-critical databases (Oracle, SAP). io1 provides up to 64,000 IOPS for high-performance needs.

st1 (Throughput Optimized HDD) for large, sequential I/O—data warehousing, log processing, MapReduce. sc1 (Cold HDD) for infrequent access—lowest cost, ideal for archival. Previous gen: Magnetic (standard) for boot volumes of older instance types.

Snapshots and Lifecycle Policies

EBS Snapshots are incremental backups stored in S3—only changed blocks are copied after initial snapshot. Create snapshots for disaster recovery, migration, and compliance. Snapshots are regional but can be copied across regions.

Snapshot Lifecycle Policies automate retention—define policies to retain daily/weekly/monthly snapshots and delete old ones. Create policies per volume or tag-based. Lifecycle Manager also creates EBS-backed AMIs automatically.

EBS Encryption uses AWS KMS to encrypt volumes and snapshots. Enable default encryption on accounts to encrypt all new volumes. Encrypted volumes and snapshots maintain encryption chain—snapshots of encrypted volumes are encrypted. Encryption is free but requires KMS key management.

Fast Snapshot Restore (FSR) initializes snapshots instantly—no lazy loading of data. Enable FSR for critical volumes where immediate full performance is required after restore.

Multi-Attach, Elastic Volumes, and Performance

Multi-Attach allows a single io1/io2 volume to be attached to multiple EC2 instances in the same AZ. Requires instances that support NVMe and clustered applications handling concurrent writes (e.g., Oracle RAC). Use with shared-nothing architectures.

Elastic Volumes dynamically modify volume type, size, and performance without detaching. Increase size online, upgrade gp2→io1, or change IOPS—no downtime. Modify through console, CLI, or SDK. Performance changes take effect in minutes.

IOPS and throughput are independent: IOPS = operations per second, throughput = MB/s data transfer. For databases: provision high IOPS. For data processing: provision high throughput. Monitor VolumeReadOps, VolumeWriteOps, VolumeThroughputPercentage in CloudWatch.

Multi-Attach considerations: only supported on io1/io2, NVMe instances, same AZ. Application must handle concurrent access—EBS doesn't provide cluster coordination. Use with caution for write-heavy workloads.

EBS Best Practices and Cost Optimization

Right-size volumes: monitor utilization and resize over-provisioned volumes. Use gp3 instead of gp2—gp3 provides 3,000 baseline IOPS and 125 MB/s throughput regardless of size, and is 20% cheaper.

Snapshot management: delete unused snapshots, use lifecycle policies to automate retention. Snapshots of deleted volumes are retained—set up cleanup automation. Copy snapshots to another region for DR.

Delete on termination: set DeleteOnTermination=true for non-persistent data (dev/test). Set false for data volumes that survive instance termination.

Performance monitoring: use CloudWatch EBS metrics to identify bottlenecks. BurstBalance (gp2/st1/sc1) indicates remaining burst credit. VolumeQueueLength shows pending I/O. Scale up before queue depth impacts performance.

EBS-optimized instances: use EBS-optimized instances for consistent IOPS/throughput to EBS volumes. Most modern instance types are EBS-optimized by default.

Quiz

1. Which EBS volume type provides independent IOPS and throughput scaling?

Question 1 options

2. What is the benefit of EBS snapshots being incremental?

Question 2 options

3. What is required for EBS Multi-Attach?

Question 3 options

Flashcards

Question

What is gp3 EBS volume?

Answer

General Purpose SSD with 3,000 baseline IOPS, 125 MB/s throughput, scalable independently of size. 20% cheaper than gp2.

Question

What is an EBS snapshot?

Answer

An incremental backup of an EBS volume stored in S3—only changed blocks are copied after the initial snapshot.

Question

What is Elastic Volumes?

Answer

A feature that lets you dynamically modify EBS volume type, size, and IOPS without detaching from an instance.

Question

When should you use io2 over gp3?

Answer

When you need sub-millisecond latency, up to 256,000 IOPS, or mission-critical databases like Oracle RAC.

Revision Notes

Key Takeaways

  • 1. gp3 is the default—better price-performance than gp2 with independent IOPS/throughput scaling
  • 2. Snapshots are incremental (stored in S3) and support cross-region copy for DR
  • 3. EBS encryption uses KMS; default encryption encrypts all new volumes
  • 4. Multi-Attach requires io1/io2, NVMe, and same AZ; use for clustered apps

Interview Tips

  • Compare volume types: gp3 vs io2 vs st1 with use cases
  • Explain incremental snapshots and how they reduce costs
  • Discuss when to use Multi-Attach and its limitations
  • Know the difference between IOPS and throughput and when to optimize each

Cheat Sheet

EBS: block storage for EC2. Types: gp3 (general, 3K IOPS base), gp2 (legacy, 3 IOPS/GB), io2/io1 (high-perf, up to 256K IOPS), st1 (throughput HDD), sc1 (cold HDD). Snapshots: incremental, in S3, cross-region copy. Encryption: KMS-based, free. Elastic Volumes: modify type/size/IOPS online. Multi-Attach: io1/io2 only, NVMe, same AZ. Monitor: CloudWatch EBS metrics (BurstBalance, QueueLength).