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.
सोप्या भाषेत: stop म्हणजे दुकान बंद करून चावी खिशात ठेवा – सामान (डेटा) आत सुरक्षित आहे, पण जागेचं भाडं (EBS चार्जेस) चालू राहतं. Terminate म्हणजे दुकान पूर्ण खाली करून परत देणं – root व्हॉल्यूमसोबत सगळं जातं. Mauli Dairy चा लाइव्ह सर्व्हर कधीच चुकून terminate होऊ नये, म्हणून त्यावर termination protection ऑन ठेवा.
आसान भाषा में: stop मतलब दुकान बंद करके चाबी जेब में रखना – सामान (डेटा) अंदर सुरक्षित है, लेकिन जगह का किराया (EBS चार्जेस) चलता रहता है. Terminate मतलब दुकान पूरी खाली करके वापस दे देना – root वॉल्यूम के साथ सब चला जाता है. Mauli Dairy का लाइव सर्वर कभी गलती से terminate नहीं होना चाहिए, इसलिए उस पर termination protection ऑन रखो.
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!
Ravindra Bagale's Tip – मराठी
बरेच students ना वाटतं instance stop केला की खर्च पूर्ण बंद. नाही – instance charges थांबतात, पण EBS storage आणि Elastic IP चे charges चालू राहतात. Lab संपली आणि server ची गरज नसेल तर terminate करा, आणि Volumes आणि Elastic IPs list रिकामी आहे का ते बघा. ध्यान रखो!
Ravindra Bagale's Tip – हिंदी
बहुत से students सोचते हैं कि instance stop किया तो खर्च पूरा बंद. नहीं – instance charges रुकते हैं, लेकिन EBS storage और Elastic IP के charges चलते रहते हैं. Lab खत्म हो गई और server की ज़रूरत नहीं है तो उसे terminate करो, और देखो कि Volumes और Elastic IPs list खाली है. ध्यान रखो!
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.