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.
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.
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.
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.
Restart comparison from this example’s initial conditions?
Discard current edits and teaching history, then rebuild the preset’s initial synthetic conditions. This does not recover real data or a terminated EC2 instance.
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 presentOriginal memory contents
Instance store: temporary files
Original data presentOriginal data on temporary instance storage
Root EBS: OS storage
Original data presentExistence: Present / stipulated yes
DeleteOnTermination: true: delete on termination
Data EBS: saved reports
Original data presentExistence: Present / stipulated yes
DeleteOnTermination: false: retain after termination
Public IPv4: possible connection target
Association unchangedAutomatic public IPv4
Explicit presence: Unknown / unverified
Elastic IP: separate allocation
Not allocatedDisassociation 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
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.
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
The example assumes a running OS; app and SSH health are separate.
An intermediate state; inspect data effects before completion.
The same instance can be started; data and charge effects differ.
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.
| Action | Original RAM contents | Original instance-store data | EBS volumes |
|---|---|---|---|
| Ordinary stop → start | Not restored | Not restored | Retained |
| Reboot | Not retained | Retained | Retained |
| Confirmed hibernation → start | Reloaded from root EBS | Not restored | Retained |
| Terminate | Lost | Lost | Per-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.
That instance cannot be started again.
Parallel destinations from the same instance; these are not actions performed in row or column order.
Volume retained; the instance itself is not restored.
Volume deleted; being a data volume does not ensure retention.
| Root setting | Data-volume setting | After assumed termination |
|---|---|---|
| true | false | Root deleted; data volume retained |
| false | true | Root retained; data volume deleted |
| Unknown | false | Root 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.
| Fixed observation | What is known about RAM | Interpretation |
|---|---|---|
| Assume confirmed hibernation | Saved to root EBS; reloaded on start | Conditional on the stipulated successful observation |
| Assume fallback to ordinary stop | Original RAM contents lost | The request alone does not establish preservation |
| Completion not observed | Save/restore unverified | Do 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
| Condition | Change in this fixed example | Not established |
|---|---|---|
| Automatic public IPv4, stop → start | Original public address released; do not treat a new assignment as the same address | The old destination or DNS is not proven usable |
| Elastic IP associated, stop → start | Association retained in this example | Real path or SSH success |
| Terminate an instance with an Elastic IP | Disassociation is separate from releasing the allocation | The 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.
| State example | Instance-use billing | Check separately |
|---|---|---|
| running / reboot in progress | Billed | EBS, public IPv4, surrounding resources and commitments |
| Ordinary stopping / stopped | Ordinary instance-use billing stops | Retained EBS, Elastic IP and other charge candidates |
| stopping during hibernation with stipulated prerequisites | Billed | EBS, including space used to save RAM |
| stopped after confirmed hibernation | Instance-use billing stops | EBS charge candidates, including space used to save RAM |
| stopping with an unknown stop cause or unverified hibernation prerequisites | Unverified from this information | Ordinary stop versus hibernation; retained resources and commitments |
| shutting-down / terminated | Instance-use billing stops for that instance | Retained 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.
| Model observation | Permitted interpretation | Do not claim |
|---|---|---|
| stopped | Not running for this access method | The real SG was diagnosed as the cause |
| SG blocks the client; route unknown | A known blocker and unknown conditions coexist | The first failure across the whole path was diagnosed |
| Stipulated public IPv4, route, SG and key setup present | Some prerequisites are plausible; host and authentication remain unverified | SSH 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
Record the outcome and what remains unverified
- 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.
- Start the same instance and explain which original data can and cannot return. Compare the reboot example.
- Change root/data EBS true, false and unknown settings; compare the confirmation with the post-termination outcome.
- Compare confirmed hibernation, normal-stop fallback and an unobserved outcome without judging from the state alone.
- 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.
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
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
- Reboot your Amazon EC2 instanceChecked:
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
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
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
- Terminate Amazon EC2 instancesChecked:
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
- How instance termination worksChecked:
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
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
- Hibernate an Amazon EC2 instanceChecked:
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
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
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
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
- EC2 On-Demand Instance PricingChecked:
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
- 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
- Amazon VPC Pricing — Public IPv4Checked:
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
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
- 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
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
- 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
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