Chapter 5: Amazon EC2 (Elastic Compute Cloud)
5.6 Instance lifecycle: stop, reboot, hibernate, terminate
Dhyan do — this table decides whether you lose data and whether you keep paying. Read it twice.
pending ──► running ──► stopping ──► stopped ──► (start) ──► pending
│ ▲
reboot │ │
▼ │
running ──► shutting-down ──► terminated (gone for ever)
| Action | What happens | Public IP | EBS root volume | Billing |
|---|---|---|---|---|
| Reboot | OS restarts on same host | Kept | Kept | Continues |
| Stop | Instance shut down; may move to new host on start | Released (new one on start); EIP kept | Kept | Instance charges stop; EBS & EIP still charged |
| Hibernate | RAM saved to EBS, then stop | Same as stop | Kept | Same as stop |
| Terminate | Instance deleted permanently | Released | Deleted if Delete on termination = yes (default for root) | All instance charges stop |
Terminate is permanent
Terminated instances cannot be recovered. Enable Termination protection (Actions → Instance settings → Change termination protection) for important servers, and take an EBS snapshot or AMI before experimenting.