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

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: EC2: launch and operation

AMI vs EBS snapshot: what each preserves and how recovery differs

An AMI is an image for launching EC2; an EBS snapshot preserves a volume’s data at a point in time. An EBS-backed AMI combines launch information with references to EBS snapshots. Choose by the required recovery outcome, rather than asking which is universally the better backup.

What you will learn

Distinguish the preservation scope and recovery requirements for launching an instance versus restoring volume data.

Prerequisite

Know EC2, EBS, Regions and AZs. The lesson focuses on EBS-backed Linux in a regular AWS Region; it does not create, restore or delete real resources.

Separate launch information from volume data

Different management units, not two names for the same thing
DimensionEBS-backed AMIEBS snapshot
Primary roleAn image used to launch EC2Point-in-time volume data
InformationBoot information and block device mappingsStored volume-block data
Relationship to EBSReferences root and applicable data snapshotsA source for creating a new EBS volume
Do not assume it includesThe complete VPC, SG, IAM or external database setupRAM, unwritten cache or data outside the volume
Relationships between an EBS-backed AMI, snapshots and new resources
Relationships between an EBS-backed AMI, snapshots and new resources1: AMI — The AMI references preserved data; these are separate resources. — Snapshots. 2: AMI — Launch a new instance from the AMI. — New EC2. 3: Snapshots — Create a new volume with the preserved point-in-time data. — New EBS. 4: New EC2 — Attach storage according to the AMI’s block device mappings. — New EBS1234AMISnapshotsNew EC2New EBSRelationships between an EBS-backed AMI, snapshots and new resources1: AMI — The AMI references preserved data; these are separate resources. — Snapshots. 2: AMI — Launch a new instance from the AMI. — New EC2. 3: Snapshots — Create a new volume with the preserved point-in-time data. — New EBS. 4: New EC2 — Attach storage according to the AMI’s block device mappings. — New EBS1234AMISnapshotsNew EC2New EBS
  1. AMI → SnapshotsThe AMI references preserved data; these are separate resources.
  2. AMI → New EC2Launch a new instance from the AMI.
  3. Snapshots → New EBSCreate a new volume with the preserved point-in-time data.
  4. New EC2 → New EBSAttach storage according to the AMI’s block device mappings.
AMI
Holds launch information and volume mappings.
Snapshots
Preserve stored data for root/applicable volumes.
New EC2
Review compatibility, placement, networking and access.
New EBS
A volume created from snapshot data.

Choose the recovery outcome: launch a server or retrieve data

Choose the outcome before selecting an artifact and recovery procedure
Desired outcomeArtifact and approachAdditional checks
Launch EC2 from a preserved OS/configurationLaunch a new instance from a suitable EBS-backed AMICompatibility, Region, SGs, permissions and post-launch behavior
Retrieve earlier files from a data volumeCreate and attach a new volume from its snapshotSame AZ as the instance, filesystem, mounts and permissions
Only a root-volume snapshot remainsAssess registering a suitable AMI or an approved root-recovery procedureArchitecture, boot mode and OS/licensing metadata
Restore an entire system after an incidentInventory whether AMIs/snapshots cover the required systemExternal DBs, S3, configuration, keys, networking and application consistency

Creating an EBS volume from a snapshot does not itself launch EC2. To read its data, create the volume in the receiving instance’s AZ and handle attachment and the filesystem correctly. A root snapshot can support AMI registration when the required boot and OS information is available.

Choose an option to see the result and explanation.

You need to inspect a file deleted from a data EBS volume. Which approach should you consider first?
Read the answer and reason

Answer: Create a separate volume from a suitable point-in-time snapshot · The snapshot is a data-recovery source. Inspect a new volume rather than immediately overwriting the active one.

A completed capture is not proof of consistent recovery

An EBS snapshot includes data written to the volume at request time, not data held only in application or OS caches. AWS recommends coordinating writes and, for a root-volume snapshot, stopping the instance first. Select a method that accounts for the application and interruption impact.

Review both disruption and consistency when choosing AMI reboot behavior
SettingMeaning to reviewAvoid this inference
Normal reboot enabledA reboot coordinates written state; plan the service interruptionApplication recovery is therefore guaranteed
NoReboot=trueNo reboot; snapshots are crash-consistent for written volume dataMemory contents and unwritten data are also preserved

Worked example: do not assume yesterday’s data matches today’s app

Fictional report application: reconcile capture time and application compatibility
ArtifactEstablished factStill unknown
Yesterday’s data snapshotA volume can be created from preserved blocksWhether today’s app accepts that data format
Yesterday’s AMIA launch image exists for a new instanceCompatibility with today’s external DB and permissions
Snapshot status is completedThe capture operation completedSuccessful file reads or business-process recovery

Choose an option to see the result and explanation.

The snapshot is completed. Can you report that recovery has been verified?
Read the answer and reason

Answer: No: test restored files and application behavior · Capture completion is not a recovery test. Restore the required data, check reads and application consistency, then report the demonstrated scope.

Before recovery, check placement, encryption and artifact state

  1. Record the required recovery point, target volumes and snapshots referenced by the AMI.
  2. Check snapshot completion and availability in the target Region.
  3. Create EBS in the receiving EC2 instance’s AZ; distinguish source and recovery target.
  4. For encrypted data, check availability of the required KMS key and permissions.
  5. Validate files, configuration and application consistency in a separate recovery target; record established outcomes and unknowns.

An encrypted snapshot preserves encryption requirements during restoration. Access to the required KMS (Key Management Service) key is part of the prerequisites. Seeing an artifact in a list does not establish that you can use its data.

Cleanup: review AMI and snapshot dependencies

Deregistering an AMI does not terminate instances already launched from it. Associated snapshots can be selected for deletion during deregistration or handled separately. A snapshot referenced by other AMIs is not deleted by that option. Review retained artifacts and their costs.

Check, then explain in your own words

  1. Separate launch information from preserved volume blocks.
  2. Identify the recovery outcome and placement, encryption and consistency conditions.
  3. Verify capture, recovery testing and cleanup separately.
Check your understanding: Does an AMI restore the complete system, including VPCs and external databases?

No. Reconcile what the AMI preserves with separately managed configuration and data.

Launching a new EC2 instance is different from restoring a working service. Check all required data, configuration, networking and access.

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.