Core lesson 7 of 18Topic: EC2 and EBS: compute and storage
What is Amazon EBS? Volumes, EC2 and snapshots explained
Amazon EBS (Elastic Block Store) provides block storage used with EC2 instances. EC2 runs the processing; an EBS volume stores OS or application data. Storage can remain after an instance stops. Distinguish a volume, a snapshot and termination settings to understand what persists and what must be checked before deletion.
Distinguish EC2, an EBS volume and a snapshot, and identify AZ placement, retention settings, required data and storage-cost checks.
Know EC2 instances, Regions and AZs. Diagrams explain storage roles; this lesson creates, attaches and deletes no real volumes.
Separate EC2 compute from EBS storage
An EBS volume is block storage that an attached instance can use like a disk. OS-level use can also require filesystem and mount configuration. This differs from storing and retrieving named objects through S3 APIs.
| Resource | Role | Distinction |
|---|---|---|
| EC2 instance | Run the OS and application | Compute is distinct from attached storage |
| EBS volume | Block storage used by EC2 | AZ, attachment, OS-level use and retention settings |
| EBS snapshot | Retain a point-in-time volume copy | Independent from the original volume; used to create new volumes |
| S3 object | Store data identified by an object key | Access through object interfaces rather than volume attachment |
A snapshot can be used to create a new volume
- Source volume → SnapshotEstablish the saved point and required consistency; do not assume snapshots exist automatically.
- Snapshot → New volumeWithin the Region, a snapshot can be used to create a volume in another AZ.
- New volume → Recovery checksA created volume and a recovered application are separate outcomes.
- Source volume
- Storage used by EC2, distinct from its snapshot.
- Snapshot
- Retains point-in-time data, not an always-current mirror.
- New volume
- Created from the snapshot in a chosen AZ.
- Recovery checks
- Verify attachment, OS/application use and required data.
Check the AZ of both the instance and volume
An EBS volume and its attached EC2 instance must be in the same AZ. Adding an application instance in another AZ does not make that volume attachable there. Preparing data for another AZ and handling subsequent updates require their own design.
Multi-Attach support depends on volume and instance types and other requirements. Do not interpret EBS as an unrestricted shared disk for arbitrary instances or AZs. This introduction uses a single-instance attachment example.
Worked example: data after instance termination
| Established condition | Interpretation |
|---|---|
| DeleteOnTermination is true | Selected for deletion on termination; check required data and actual retention controls first |
| DeleteOnTermination is false | Retained after termination; review purpose and storage charges |
| A snapshot exists | Check its time and scope; it may not contain all current required data |
| Settings or ownership are unknown | Establish the data, owner and dependencies before a destructive decision |
Do not rely on “root disks disappear” or “data disks remain.” Defaults vary with how a volume is created or attached. Check the actual per-volume setting and where required data was saved.
Choose an option to see the result and explanation.
Before deletion, review data, retention controls and cost
Review the attachment, owner and required data before deleting a volume. A directly deleted volume must first be detached if attached. A volume matching a Recycle Bin retention rule is retained instead of immediately deleted. Distinguish the requested action from the resulting retention state.
Costs depend on the selected storage type, provisioned capacity/performance and retained snapshots. A small amount of written file data does not by itself establish a small bill. Compare the provisioned resources with current terms rather than a fixed price or blanket free-use claim.
- Inventory instances, volumes and snapshots separately.
- Check each volume’s AZ, attachment, owner and required data.
- Review termination settings, snapshot time, retention controls and recovery requirements.
- Perform only authorized work, then verify the result and retained resources.
- Separate ongoing storage costs from past use and billing updates.
Check, then explain in your own words
- Explain the roles of EC2, a volume and a snapshot.
- Identify the same-AZ attachment requirement and the saved recovery point.
- Separate termination settings, retention controls, data needs and cost.
Check your understanding: Does having one snapshot guarantee recovery of the latest required data?
No. Check its time, scope, consistency and usability after restoration.
A snapshot captures a point in time. It does not automatically include later changes or data stored elsewhere, and usable business recovery needs its own verification.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
Scope and conditionsVolumes attached to EC2 and independent point-in-time snapshots. No storage performance or recoverability guarantee for an actual workload.
Used in this lessonSeparate EC2 compute from EBS storage A snapshot can be used to create a new volume
- What is Amazon S3?Checked:
Scope and conditionsObject storage; configuration and storage class affect behavior
Used in this lessonSeparate EC2 compute from EBS storage
- Amazon EBS snapshotsChecked:
Scope and conditionsPoint-in-time/incremental snapshots, independent restoration to a new volume and regional cross-AZ availability. Snapshot existence is not proof of application-consistent recovery.
Used in this lessonA snapshot can be used to create a new volume Before deletion, review data, retention controls and cost
- Amazon EBS volumesChecked:
Scope and conditionsBlock storage, same-AZ attachment, multiple volumes and conditional Multi-Attach support. Managed-volume service controls are not generalized to all volumes.
Used in this lessonCheck the AZ of both the instance and volume
Scope and conditionsData loss and persistence; DeleteOnTermination is evaluated for each EBS volume, not assumed from instance state.
Used in this lessonWorked example: data after instance termination
- Amazon EBS pricingChecked:
Scope and conditionsProvisioned capacity, additional performance and snapshots; no unit rate or price quote is embedded.
Used in this lessonWorked example: data after instance termination Before deletion, review data, retention controls and cost
- Delete an Amazon EBS volumeChecked:
Scope and conditionsDirect deletion requires detachment; volumes matching a Recycle Bin retention rule are retained rather than immediately deleted. No destructive operation performed.
Used in this lessonBefore deletion, review data, retention controls and cost