Amazon EBS: Complete Guide for AWS Solutions Architect Professional
Why Amazon EBS is Important
Amazon Elastic Block Store (EBS) is a foundational storage service that provides persistent block-level storage volumes for EC2 instances. Understanding EBS is critical for the AWS Solutions Architect Professional exam because it underpins many architectural decisions related to performance, durability, cost optimization, and disaster recovery. EBS volumes are essential for databases, enterprise applications, big data analytics, and file systems that require consistent, low-latency performance.
What is Amazon EBS?
Amazon EBS provides block storage volumes that persist independently from the life of an EC2 instance. Unlike instance store volumes, EBS volumes can be detached from one instance and attached to another, making them ideal for data that must persist beyond the instance lifecycle.
Key characteristics include:
- Persistence: Data remains intact after instance termination (if configured)
- Availability: Automatically replicated within a single Availability Zone
- Snapshots: Point-in-time backups stored in Amazon S3
- Encryption: Supports encryption at rest and in transit
- Elasticity: Volumes can be resized and type-changed while in use
EBS Volume Types
General Purpose SSD (gp3/gp2):
- gp3: Baseline of 3,000 IOPS and 125 MiB/s, independently scalable up to 16,000 IOPS and 1,000 MiB/s
- gp2: Baseline of 3 IOPS per GB, bursting up to 3,000 IOPS, maximum 16,000 IOPS
- Best for: Boot volumes, development environments, virtual desktops
Provisioned IOPS SSD (io2/io2 Block Express/io1):
- io2 Block Express: Up to 256,000 IOPS and 4,000 MiB/s throughput
- io2/io1: Up to 64,000 IOPS for Nitro instances
- Best for: Critical business applications, large databases requiring sustained IOPS
- Supports Multi-Attach for io1/io2
Throughput Optimized HDD (st1):
- Maximum throughput of 500 MiB/s
- Cannot be a boot volume
- Best for: Big data, data warehouses, log processing
Cold HDD (sc1):
- Lowest cost option for infrequently accessed data
- Maximum throughput of 250 MiB/s
- Cannot be a boot volume
- Best for: Archival storage, infrequent access scenarios
How Amazon EBS Works
Architecture:
EBS volumes are network-attached storage that communicate with EC2 instances over the AWS network. Each volume is automatically replicated within its Availability Zone to protect against component failure.
Snapshots:
- Incremental backups stored in S3
- Can be copied across regions for disaster recovery
- Can be shared with other AWS accounts or made public
- Fast Snapshot Restore (FSR) eliminates latency when restoring from snapshots
Encryption:
- Uses AWS KMS keys (AWS managed or customer managed)
- Encrypts data at rest, in transit, and all snapshots
- Minimal impact on latency
- Snapshots of encrypted volumes are automatically encrypted
Multi-Attach:
- Available for io1/io2 volumes only
- Allows attachment to up to 16 Nitro-based instances in the same AZ
- Requires cluster-aware file system
EBS-Optimized Instances:
- Dedicated bandwidth between EC2 and EBS
- Most current-generation instances are EBS-optimized by default
Performance Considerations
- IOPS vs Throughput: Understand when to optimize for IOPS (transactional workloads) versus throughput (sequential workloads)
- Volume Size Impact: For gp2, larger volumes provide higher baseline IOPS
- Instance Throughput Limits: EC2 instance type determines maximum EBS throughput
- Pre-warming: Volumes restored from snapshots may require initialization for full performance (or use FSR)
Exam Tips: Answering Questions on Amazon EBS
1. Volume Type Selection:
When questions describe high IOPS requirements for databases, think io2/io1. For cost-effective general workloads, consider gp3. For sequential, throughput-intensive workloads like log processing, choose st1.
2. Multi-Attach Scenarios:
If a question mentions shared storage across multiple EC2 instances in the same AZ with block storage requirements, Multi-Attach with io1/io2 is likely the answer. Remember it requires cluster-aware applications.
3. Cross-Region Disaster Recovery:
Questions about DR often involve copying EBS snapshots to another region. Remember snapshots are stored in S3 and can be copied across regions.
4. Encryption Requirements:
When encryption is mentioned, remember that you cannot encrypt an existing unencrypted volume. You must create an encrypted snapshot and restore from it, or create a new encrypted volume and migrate data.
5. Cost Optimization:
gp3 is generally more cost-effective than gp2 when you need to provision specific IOPS and throughput. sc1 is the cheapest option for cold data.
6. Performance Troubleshooting:
If questions describe degraded performance after restoring from snapshot, think about pre-warming or Fast Snapshot Restore.
7. High Availability Limitations:
EBS volumes are AZ-specific. For cross-AZ redundancy, you need snapshots or replication strategies. This is a common trap in exam questions.
8. RAID Configurations:
RAID 0 for performance (striping), but understand AWS recommends against RAID 5/6 due to parity write penalties. RAID 1 for redundancy is rarely needed given EBS built-in replication.
9. io2 Block Express:
For extreme IOPS requirements (greater than 64,000), io2 Block Express on supported instances is the solution.
10. Lifecycle Management:
Amazon Data Lifecycle Manager (DLM) automates snapshot creation, retention, and deletion. Questions about automated backup policies often point to DLM.
Common Exam Scenarios
- Database requiring 80,000 IOPS: io2 Block Express
- Cost-effective boot volume: gp3
- Shared block storage for clustered application: EBS Multi-Attach with io2
- Big data analytics with sequential reads: st1
- Encrypted volume from unencrypted source: Create encrypted snapshot copy, then new volume
- Cross-region backup strategy: Snapshot copy to target region with automation via DLM or AWS Backup