INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

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.

What you will learn

Distinguish EC2, an EBS volume and a snapshot, and identify AZ placement, retention settings, required data and storage-cost checks.

Prerequisite

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.

Different storage resources have different interfaces
ResourceRoleDistinction
EC2 instanceRun the OS and applicationCompute is distinct from attached storage
EBS volumeBlock storage used by EC2AZ, attachment, OS-level use and retention settings
EBS snapshotRetain a point-in-time volume copyIndependent from the original volume; used to create new volumes
S3 objectStore data identified by an object keyAccess through object interfaces rather than volume attachment

A snapshot can be used to create a new volume

Distinguish the source volume, saved point and restored volume
Distinguish the source volume, saved point and restored volume1: Source volume — Establish the saved point and required consistency; do not assume snapshots exist automatically. — Snapshot. 2: Snapshot — Within the Region, a snapshot can be used to create a volume in another AZ. — New volume. 3: New volume — A created volume and a recovered application are separate outcomes. — Recovery checks123Source volumeSnapshotNew volumeRecovery checksDistinguish the source volume, saved point and restored volume1: Source volume — Establish the saved point and required consistency; do not assume snapshots exist automatically. — Snapshot. 2: Snapshot — Within the Region, a snapshot can be used to create a volume in another AZ. — New volume. 3: New volume — A created volume and a recovered application are separate outcomes. — Recovery checks123Source volumeSnapshotNew volumeRecovery checks
  1. Source volume → SnapshotEstablish the saved point and required consistency; do not assume snapshots exist automatically.
  2. Snapshot → New volumeWithin the Region, a snapshot can be used to create a volume in another AZ.
  3. 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

Check each volume’s own setting
Established conditionInterpretation
DeleteOnTermination is trueSelected for deletion on termination; check required data and actual retention controls first
DeleteOnTermination is falseRetained after termination; review purpose and storage charges
A snapshot existsCheck its time and scope; it may not contain all current required data
Settings or ownership are unknownEstablish 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.

An EC2 instance is stopped. Must the retained EBS volume stop incurring charges?
Read the answer and reason

Answer: No: review storage charges separately · Compute runtime and provisioned/retained storage are separate. Review EBS and other storage charges after stopping.

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.

  1. Inventory instances, volumes and snapshots separately.
  2. Check each volume’s AZ, attachment, owner and required data.
  3. Review termination settings, snapshot time, retention controls and recovery requirements.
  4. Perform only authorized work, then verify the result and retained resources.
  5. Separate ongoing storage costs from past use and billing updates.

Check, then explain in your own words

  1. Explain the roles of EC2, a volume and a snapshot.
  2. Identify the same-AZ attachment requirement and the saved recovery point.
  3. 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.