EBS volume types and AZ placement
A disk that outlives a virtual machine
Amazon Elastic Block Store (EBS) supplies block storage for EC2. Think of it as a virtual disk on which an operating system can create a filesystem or a database can store pages. Unlike RAM, its data is persistent. Unlike EC2 instance store, it can survive stopping an EBS-backed instance. A volume may survive termination too, depending on its DeleteOnTermination setting. A detached volume is still a resource with storage charges.
Choose storage by access pattern
SSD is a good starting point for random small reads and writes. General-purpose gp3 lets you choose performance separately from capacity within service limits; gp2 performance is more closely tied to size and burst credits. Provisioned IOPS io2 and io1 suit demanding I/O workloads; check latency requirements and price before selecting one. HDD types st1 and sc1 suit large sequential workloads, with sc1 intended for less frequently accessed data. Neither HDD type is suitable as an EC2 boot volume. Older magnetic standard volumes are a legacy choice, not the default for new designs.
Placement and attachment
A normal EBS volume attaches to an instance in the same Availability Zone (AZ). A volume is not a multi-AZ shared filesystem. For a different AZ in the same Region, plan to create a new volume from a snapshot there. Some io1/io2 configurations support Multi-Attach, but applications must coordinate writes; this is not a general shared filesystem. Use the root volume for boot files and a separate data volume where independent retention or resizing is valuable. S3 instead stores objects addressed by keys; it is not a drop-in raw disk.
Example: a bookstore database
A fictional database runs in AZ-A and needs frequent small updates. Start by evaluating an encrypted gp3 data volume in AZ-A. A large sequential archive reader may instead evaluate st1 if access is frequent. These are candidates, not measured performance or deployment instructions.
Practice and common mistakes
Choose a volume for a boot disk, a random-write database, and a rarely read sequential archive. Explain why a spare volume in AZ-B cannot be attached directly to the AZ-A instance. Never format an existing data disk just because the operating system does not recognize its mount. For now use only the offline worksheet. Next, learn how to size performance and capacity.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
EBS volume types and AZ placement — knowledge check
Apply EBS concepts to offline storage and recovery scenarios.
A database needs durable random-write storage on EC2. Which candidate should you evaluate first?
A volume is in AZ-A and an instance is in AZ-B in the same Region. What is the appropriate plan?
Which choice is not supported for an EC2 boot volume?
An EBS-backed instance is stopped. What happens to its attached EBS data?
What determines whether an attached EBS volume is removed on instance termination?