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

Esc to close · Search terms stay on your device

LEARNING日本語

ExerciseTopic: Account protection and resource cleanup

EC2 lifecycle lab: compare stop/start, reboot and termination

Stopping an EC2 instance leaves it available to start again; terminating it removes that instance. The same action affects original data differently in memory, instance store and EBS. Change conditions for one fictional server and compare its state, storage, connection prerequisites and remaining charge candidates.

What you will learn

Explain which original data survives stop/start, reboot, hibernation or termination, what remains unknown, and what the model does not establish about charges or SSH.

Prerequisite

For readers who know the roles of an EC2 instance and EBS. No AWS account or real data is needed. This page performs no real AWS action and accepts no keys, real IPs, logs or code.

Start the exercise →

Compare storage locations on the same server

The opening example is a user-managed, standalone Linux instance. Assume an in-progress calculation in RAM, temporary output on instance store, the OS on the root EBS volume and a saved report on an additional EBS volume. Compare whether that original data survives. Having fresh memory or storage available later does not mean the original data returned.

Actions use fixed ordinary EBS-root examples. Permissions, actual host capacity and OS/application health are not checked. The next completed state is explicitly assumed for the example, without predicting AWS duration or success rates. Hibernation likewise compares fixed success, normal-stop fallback and unobserved outcomes.

Try it: separate requests from completion

All examples are synthetic. No AWS connection, user data, keys, logs, code input or storage. No lifecycle action has been performed in the initial view.

Showing the initial synthetic conditions; no action requested yet.

1. Request an action

Current state and action outcome

State: Running · Phase: No pending teaching request. Instance usage and remaining resource charge candidates are separate. No bill total is calculated.

2. Compare this example’s completion outcome

After requesting an action, apply a stipulated completion observation here.

Next comparison for this fixed example: Request ordinary stop

Change one condition

Changing a value marks the previous result stale and invalidates termination confirmation. Editing alone requests no AWS action.

Current teaching state

Running running

No pending teaching request

RAM: in-progress calculation

Original data present

Original memory contents

Instance store: temporary files

Original data present

Original data on temporary instance storage

Root EBS: OS storage

Original data present

Existence: Present / stipulated yes
DeleteOnTermination: true: delete on termination

Data EBS: saved reports

Original data present

Existence: Present / stipulated yes
DeleteOnTermination: false: retain after termination

Public IPv4: possible connection target

Association unchanged

Automatic public IPv4
Explicit presence: Unknown / unverified

Elastic IP: separate allocation

Not allocated

Disassociation and allocation release are separate

Read this example’s assumptions
root
EBS-backed root volume
Management
User-managed standalone instance
Stop basis
Ordinary stop
Hibernation prerequisites
Prerequisites stipulated
Stop protection
Disabled
Termination protection
Disabled
Private IPv4
Retained
Connection method
Direct Internet IPv4/TCP22 only
Public route prerequisite
Present / stipulated yes
SG: TCP22 from the client
Present / stipulated yes
Key configuration (authentication unverified)
Present / stipulated yes

Return to actions

Assessment and what remains unverified

Unverified conditions remain

  • Instance usage and remaining resource charge candidates are separate. No bill total is calculated.

Known blockers

None enumerated by this bounded model. This does not prove a real AWS environment is clear.

Unverified operation conditions

None enumerated by this bounded model. This does not prove a real AWS environment is clear.

Charge interpretation

Instance usage only: Classified billed

Instance-use classification from the stipulated state only.

  • Root EBS — Charge candidate
  • Data EBS — Charge candidate
  • Automatic public IPv4 — Charge candidate
  • Other resources / commitments — Unassessed

No bill total, rate, Free Tier or other commitments are calculated. Stop or termination does not establish a zero bill.

SSH: no real connection attempted

Unverified conditions remain

  • Some bounded prerequisites are present. Host, return path and authentication remain unverified; this is not SSH success.

Still unverified:

  • Network ACL and return path
  • Guest OS
  • SSH listener
  • Actual authentication

Real AWS permissions, API acceptance, completion, application health and bills remain unverified.

Return to actions

Teaching history

Up to 32 steps. History, reset and scenario reselection reconstruct synthetic inputs; they do not recover lost data or terminated instances. History navigation invalidates termination confirmation.

    Compare stop/start with reboot

    running

    The example assumes a running OS; app and SSH health are separate.

    Choose ordinary stoprunning → stopping
    stopping

    An intermediate state; inspect data effects before completion.

    Inspect this example’s assumed completionstopping → stopped
    stopped

    The same instance can be started; data and charge effects differ.

    Ordinary stop: arrows show changes of instance state

    Start resumes the same stopped instance through pending to running. Launch creates a new instance and is a different operation. Starting after an ordinary stop does not restore the lost calculation or temporary output.

    Compare the original data after assumed completion
    ActionOriginal RAM contentsOriginal instance-store dataEBS volumes
    Ordinary stop → startNot restoredNot restoredRetained
    RebootNot retainedRetainedRetained
    Confirmed hibernation → startReloaded from root EBSNot restoredRetained
    TerminateLostLostPer-volume termination setting

    The table assumes that the original data exists before the action. It does not mean that a later start, reboot or hibernation restores data already lost.

    An EC2 instance remains running during reboot. The lab’s reboot phase is not a seventh AWS instance state named rebooting. The running label alone does not verify OS readiness, application health or SSH connectivity.

    Read the termination setting for each EBS volume

    DeleteOnTermination is the per-volume setting that controls deletion when its instance terminates. True means delete, false means retain, and an unknown setting leaves the result unverified. The root/data label alone does not determine the outcome.

    These ordinary-action examples stipulate that both stop protection and termination protection are disabled. Stop protection also blocks console/API termination. Unknown protection is not assumed disabled. The lab’s confirmation button neither verifies nor disables real permissions or protection settings. In the lab, you can cancel the preview before confirming termination. Changing a condition requires a fresh confirmation.

    Terminate this instance

    That instance cannot be started again.

    Parallel destinations from the same instance; these are not actions performed in row or column order.

    Retain according to this volume’s settingTerminate this instance → Root EBS: false
    Root EBS: false

    Volume retained; the instance itself is not restored.

    Delete according to this volume’s settingTerminate this instance → Data EBS: true
    Data EBS: true

    Volume deleted; being a data volume does not ensure retention.

    One termination action, different volume outcomes in a fixed example
    Compare reversed and unknown settings
    Root settingData-volume settingAfter assumed termination
    truefalseRoot deleted; data volume retained
    falsetrueRoot retained; data volume deleted
    UnknownfalseRoot outcome unverified; data volume retained

    You cannot start the same terminated instance to retrieve its data. Undo/history and reset restore teaching conditions only; they do not reverse AWS termination or recover deleted data. A retained EBS volume does not by itself establish the required files, application consistency or successful recovery.

    Separate a hibernation request from saved RAM

    Hibernation saves RAM to the root EBS volume for restoration on start, when enabled and supported by the configuration. A requested hibernation that cannot complete can fall back to a normal stop. This lab does not predict success from an AMI or instance size. The three observations below use fixed examples with established hibernation prerequisites. An awaiting-hibernation declaration alone, with prerequisites unverified, establishes neither RAM preservation nor the instance-use billing basis.

    Keep three fixed observations separate
    Fixed observationWhat is known about RAMInterpretation
    Assume confirmed hibernationSaved to root EBS; reloaded on startConditional on the stipulated successful observation
    Assume fallback to ordinary stopOriginal RAM contents lostThe request alone does not establish preservation
    Completion not observedSave/restore unverifiedDo not invent a completed outcome

    The stopped label alone does not distinguish an ordinary stop, successful hibernation or fallback stop. Read the state together with the observation that establishes it. Original instance-store data is lost in the completed success and fallback examples. An unobserved example is not silently advanced to a completed outcome.

    Inspect addresses and charges separately

    Distinguish automatic public IPv4 from Elastic IP
    ConditionChange in this fixed exampleNot established
    Automatic public IPv4, stop → startOriginal public address released; do not treat a new assignment as the same addressThe old destination or DNS is not proven usable
    Elastic IP associated, stop → startAssociation retained in this exampleReal path or SSH success
    Terminate an instance with an Elastic IPDisassociation is separate from releasing the allocationThe IP and its charges are not proven removed from the account

    Address comparisons assume one primary ENI, the instance’s virtual network interface. They do not generalize to multiple interfaces or other access methods. An unknown public-address type is not silently classified as automatic or Elastic IP.

    Separate instance-use billing from retained resources and commitments
    State exampleInstance-use billingCheck separately
    running / reboot in progressBilledEBS, public IPv4, surrounding resources and commitments
    Ordinary stopping / stoppedOrdinary instance-use billing stopsRetained EBS, Elastic IP and other charge candidates
    stopping during hibernation with stipulated prerequisitesBilledEBS, including space used to save RAM
    stopped after confirmed hibernationInstance-use billing stopsEBS charge candidates, including space used to save RAM
    stopping with an unknown stop cause or unverified hibernation prerequisitesUnverified from this informationOrdinary stop versus hibernation; retained resources and commitments
    shutting-down / terminatedInstance-use billing stops for that instanceRetained EBS, IP allocation, other resources and commitments

    The lab calculates no rates, elapsed usage or bill total. Stopping instance-use billing does not mean a zero account bill. Free Tier conditions, purchase commitments, licensing, snapshots and other resources require separate checks.

    Satisfied prerequisites do not prove SSH success

    Connection comparisons cover direct Internet SSH over IPv4/TCP22 only. They show known blockers such as a stopped instance, no public IPv4 or an SG that does not allow the stipulated client. Unknown route or key configuration remains listed as unknown.

    Read the connection result at its actual scope
    Model observationPermitted interpretationDo not claim
    stoppedNot running for this access methodThe real SG was diagnosed as the cause
    SG blocks the client; route unknownA known blocker and unknown conditions coexistThe first failure across the whole path was diagnosed
    Stipulated public IPv4, route, SG and key setup presentSome prerequisites are plausible; host and authentication remain unverifiedSSH succeeded or security is certified

    Session Manager, IPv6, VPN, bastions and EC2 Instance Connect Endpoint have different prerequisites. This model does not declare them unusable merely because a public IPv4 address is absent. Do not replace investigation with real-key input or world-open port22.

    Check your interpretation

    After an ordinary stop completes, you start the instance. What happens to the original instance-store files?
    Read answer and reason

    They are not restored · Instance-store persistence differs from EBS retention. Start does not recover temporary files lost at an ordinary stop.

    At termination, root EBS has false and the additional EBS volume has true. What follows from those settings?
    Read answer and reason

    Root retained; data deleted · False retains the root volume; true deletes the data volume. A retained volume does not let you start the terminated instance.

    Can you guarantee that an EBS volume survives termination when DeleteOnTermination is unknown?
    Read answer and reason

    Keep the outcome unverified · Check that particular volume’s setting rather than inferring it from its root/data role.

    You requested hibernation and now see stopped. Does that alone verify that RAM was saved?
    Read answer and reason

    Observe success versus fallback · Stopped alone does not establish preservation. The lab separately labels fixed success, fallback and unobserved examples.

    The fixed public IPv4, route, SG and key settings are present. Has SSH success been verified?
    Read answer and reason

    Host and authentication remain unverified · The lab checks bounded prerequisites only. It makes no real connection and does not report SSH success.

    An ordinary stop completed, with EBS and an Elastic IP allocation retained. Is the account bill zero?
    Read answer and reason

    Check retained resources and commitments · Retained EBS and public IPv4 are charge candidates. The lab does not calculate actual bills, commitments or Free Tier eligibility.

    Record the outcome and what remains unverified

    1. Compare one action and storage location at a time, starting with an ordinary stop in progress and after assumed completion. Read RAM, instance store and EBS separately.
    2. Start the same instance and explain which original data can and cannot return. Compare the reboot example.
    3. Change root/data EBS true, false and unknown settings; compare the confirmation with the post-termination outcome.
    4. Compare confirmed hibernation, normal-stop fallback and an unobserved outcome without judging from the state alone.
    5. Record known SSH blockers, unknowns, address type, instance-use billing and remaining charge candidates separately. Distinguish the model’s established conditions from the real-world facts it leaves unverified.
    Check your understanding: An instance terminated with root EBS=false and an unknown setting on the data volume. What is established and what remains unverified?

    The instance cannot start again; root EBS is retained and the data-volume outcome is unverified. Recovery and total charges are separate.

    Do not collapse a retained resource, original data, application recovery and remaining resource/commitment charges into one success label.

    Sources and checked conditions

    Official document review: 2026-10-29. The checked conditions below support this teaching model; no live AWS action, connection, billing, data loss or recovery was tested.

    1. Scope and conditionsChecked ordinary instance states, action versus completion, storage comparison and the billing distinction between normal-stop and hibernation stopping. The lab predicts no API success, duration or bill total.

      Used in this lessonCompare stop/start with reboot Inspect addresses and charges separately Check your interpretation

    2. Scope and conditionsChecked lost RAM, instance-store data and automatic public IPv4 versus retained EBS/ENI resources. Preserve the standalone ordinary EBS-root scope; do not generalize to Auto Scaling, force or OS shutdown.

      Used in this lessonCompare stop/start with reboot Inspect addresses and charges separately Check your interpretation

    3. Scope and conditionsChecked running state and instance-store/IP retention for a user-initiated reboot. Do not broaden this into all AWS maintenance/migration/recovery behavior or infer host/SSH health from running.

      Used in this lessonCompare stop/start with reboot

    4. Scope and conditionsInstance-store data survives reboot but not stop, hibernation or termination. Fresh storage later is not restored original data. No actual erasure or recovery experiment performed.

      Used in this lessonCompare stop/start with reboot Separate a hibernation request from saved RAM Check your interpretation

    5. Scope and conditionsChecked per-volume true/delete and false/retain plus defaults that vary by attachment timing/method. Unknown stays unknown. A retained EBS volume does not establish data consistency or successful recovery.

      Used in this lessonCompare stop/start with reboot Read the termination setting for each EBS volume Check your interpretation

    6. Scope and conditionsTermination is irreversible for that instance. Separate teaching history/reset from AWS recovery. Apply per-volume EBS settings and distinguish a new launch from starting the terminated instance.

      Used in this lessonRead the termination setting for each EBS volume Check your interpretation

    7. Scope and conditionsChecked Elastic IP detachment, RAM/instance-store loss and per-volume EBS retention. Apply the text's true/false conditions rather than generalizing the diagram alt text about root deletion. Read address allocation separately with explicit-release conditions.

      Used in this lessonInspect addresses and charges separately

    8. Scope and conditionsChecked RAM saved to root EBS and reloaded on start after successful hibernation. Use only in examples with stipulated success; do not restore already-lost original data or predict real success.

      Used in this lessonCompare stop/start with reboot Separate a hibernation request from saved RAM Inspect addresses and charges separately Check your interpretation

    9. Scope and conditionsChecked fallback to normal shutdown when hibernation cannot succeed. Separate request, success, fallback and unobserved completion; stopped alone does not prove RAM preservation. No runnable command copied into the lesson.

      Used in this lessonSeparate a hibernation request from saved RAM Check your interpretation

    10. Scope and conditionsChecked launch-time enablement and AMI/OS/memory/root-EBS prerequisites. Do not embed changing support tables as a compatibility predictor; use fixed confirmed/not-enabled/unknown assumptions.

      Used in this lessonSeparate a hibernation request from saved RAM

    11. Scope and conditionsChecked automatic public IPv4 changes and multi-ENI exceptions. Comparisons use one primary ENI; Elastic IP association, allocation release and real connection success remain separate facts.

      Used in this lessonInspect addresses and charges separately Satisfied prerequisites do not prove SSH success

    12. Scope and conditionsSeparate method, target, routes, controls, host and authentication. The lab checks some direct-Internet IPv4/TCP22 prerequisites only, never SSH success from SG/key setup. No real keys, world-open22 or verification bypass requested.

      Used in this lessonSatisfied prerequisites do not prove SSH success Check your interpretation

    13. Scope and conditionsChecked OS/purchase-dependent billing granularity. No hourly rate, bill, Free Tier or commitment offset calculation; used only to distinguish instance usage from other resources/terms.

      Used in this lessonInspect addresses and charges separately Check your interpretation

    14. EBS PricingChecked:

      Scope and conditionsChecked separate charge candidates for provisioned EBS storage/performance. Stopped compute does not imply free storage; no rates copied or prices calculated.

      Used in this lessonInspect addresses and charges separately Check your interpretation

    15. Scope and conditionsChecked in-use/idle charge candidates for AWS-provided public IPv4. An unassociated Elastic IP allocation is not automatically free. BYOIP/COIP and exact rates remain outside the initial model.

      Used in this lessonInspect addresses and charges separately Check your interpretation

    16. Scope and conditionsChecked that DisableApiStop blocks console/CLI/API termination as well as stop without automatically setting DisableApiTermination. Unknown protection stays unknown; do not extend protection to OS shutdown, scheduled events or Auto Scaling.

      Used in this lessonRead the termination setting for each EBS volume

    17. Elastic IP addressesChecked:

      Scope and conditionsChecked allocation to an account versus association with a resource, and persistence of allocation after disassociation until explicit release. Do not treat an automatic public IP as the same resource.

      Used in this lessonInspect addresses and charges separately

    18. Scope and conditionsChecked user-initiated stop/start for EBS-root instances and that stopping does not delete the instance. Distinguish Start from a new launch. Do not extend the model to instance-store roots, forced stops, guest shutdown or Auto Scaling. Do not infer real completion or duration; use the separate lifecycle billing table for state-based billing.

      Used in this lessonLesson overview and review

    19. StopInstancesChecked:

      Scope and conditionsChecked that the response example reports the intermediate stopping state. Hibernate requires launch-time enablement and prerequisites; unsuccessful hibernation falls back to normal shutdown. Use this to distinguish a request from completion. Force and SkipOsShutdown remain outside the lab. For EBS deletion, use per-volume DeleteOnTermination guidance instead of the broad termination wording in the API overview.

      Used in this lessonLesson overview and review

    20. Scope and conditionsChecked that DisableApiTermination protects against API termination, including through the console. Read it separately from stop protection and do not treat unknown as disabled. Do not extend protection to guest shutdown, scheduled AWS termination or Auto Scaling. Spot and multi-AZ bulk termination remain outside the lab. Teaching confirmation and cancellation do not modify this AWS setting.

      Used in this lessonLesson overview and review