So you are done for the day and stop your EC2 Instance.
But are you sure you want to “stop” and not “terminate” it? What’s the difference?
- You can stop an Amazon EBS-backed instance, but not an Amazon S3-backed instance.
- Stopping causes the instance to stop running (its status goes from running to stopping to stopped). A stopped instance persists in Amazon EBS, which allows it to be re-started.
- Stopping is different from terminating; you can’t re-start a terminated instance. Because Amazon S3-backed AMIs can’t be stopped, they’re either running or terminated. For more information about what happens and what you can do while an instance is stopped, see Stop/Start
- When the instance is stopped, you’re not charged for any instance hours, only the volume storage. Each time you transition an instance from stopped to started, Amazon charges a full instance hour, even if transitions happen multiple times within a single hour
- If you were using an elastic IP address with the instance, the address is automatically unmapped when the instance stops. While the instance is stopped, you’re charged for the address being unmapped (unless you remap it to another instance).
- The root device volume and any others that you added either at the time of launch (through block device mapping) or after launch (by attaching volumes) remain attached while the instance is stopped. Any ephemeral storage does not persist. While the instance is stopped, you can’t change which devices are mapped to the instance.
- Each Amazon EBS-backed instance has an attribute called
InstanceInitiatedShutdownBehaviorthat controls whether the instance stops or terminates when you initiate a shutdown from within the instance itself. The default is stop. You can modify the attribute while the instance is running or stopped
- When an instance terminates, any ephemeral storage is deleted.
- By default, any volumes that were created when the instance launched (the root device and any others specified in the block device mapping) are automatically deleted when the instance terminates
- However, any volumes that you attached after the instance was running are not deleted. If you detach and then re-attach a volume that was created at instance launch, it’s treated like a new volume that you attached after the launch, it will persist after instance termination and you will continue being charged for it unless you terminate it…
So..keep a tight eye on the Instances and Volumes tab of the AWS Console to realize what is alive and accruing cost!!!