Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 5: Amazon EC2 (Elastic Compute Cloud)

5.6 Instance lifecycle: stop, reboot, hibernate, terminate

Pay attention – this table decides whether your data stays or goes, and whether the bill keeps running or stops. Read it twice, friends.

  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

In simple words: stop is like closing your shop and keeping the key in your pocket – the goods (data) are safe inside, but the rent for the space (EBS charges) keeps running. Terminate is like emptying the shop completely and handing it back – everything goes, along with the root volume. Mauli Dairy's live server must never be terminated by mistake, so keep termination protection on for it.

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.

Ravindra Bagale's Tip

Many students think that once they stop an instance, all charges end. No – instance charges stop, but EBS storage and Elastic IP charges continue. When the lab is over and you don't need the server, terminate it, and check that the Volumes and Elastic IPs lists are empty. Keep this in mind!

Lab

Ek test instance mauli-test-1 var ha kram kara: reboot karun public IP bagha, mag stop aani start karun navin public IP bagha. Nantar termination protection on karun terminate karaycha prayatna kara aani kay hota te bagha. Shevti protection off karun terminate kara aani Volumes madhe root volume gela ka te check kara.