Hacker News new | past | comments | ask | show | jobs | submit login

So if you terminate an instance on AWS you automatically lose your data? How does that work? I've never used AWS, I usually self host or use 1and1 VPS



depends, TL;DR, local disk drives (Ephemeral) do not persist anything that wasn't part of the base image if you power down the machine (doesn't include restarts - data is persisted in this situation). network based drives (EBS) persist all their data across machine shutdown.

Slightly longer version - When you stop a AWS instance, the instance is torn down completely and all local state/data (Ephemeral) on the hypervisor is lost. when you then start the instance again a new hypervisor with spare capacity is found and then booted with your chosen base disk image. Restarts do not cause your instance to torn down so you don't lose local state / data. If your instance uses network drives (EBS) then these drives keep state when your server is torn down, and are re-attached when the server is started back up again,


If you click Terminate, I believe Amazon deletes the default EBS drive generated when you started the instance as well as any instance storage.


Yeah, if you terminate rather than stop the instance then everything that was created as part of the instance will be destroyed by default although you can choose to not kill attached EBS drives. Any EBS drives that were attached after instance creation will be left untouched by default after instance termination.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: