- Newest
- Most votes
- Most comments
I want to know if I get charged for stopped EC2 instances.
simple answer is - no you don't get charged for stopped EC2 instance.
but you might get charged for some other resources if they are attached to that stopped EC2 instance, like EBS volume, EIP address etc
I saw somewhere that I would only get charged for EBS storage, but I don't understand what that storage is.
there are 2 kinds of block storage used by EC2 instances: Instance-store (aka ephemeral) and EBS.
An instance store provides temporary block-level storage for your instance. This storage is located on disks that are physically attached to the host computer, where your instance was created (and stopped).
Amazon Elastic Block Store (Amazon EBS) provides persistent block storage volumes for use with Amazon EC2 instances in the AWS Cloud.
more details on EBS here https://aws.amazon.com/ebs/
and on both storage options in EC2 documentation http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Storage.html
If I don't get charged for it being stopped, then this means that I don't ever have to actually terminate/delete my instances right? I can always just keep them stopped, and therefore I wouldn't lose my data on those machines.
if you stop your instance, any ephemeral volume (aka Instance-store, the temporary storage) will be released from instance back to hypervisor, and the data stored on that volume will be lost.
consequently, if your instance boot/root volume is based on Instance-store (temporary), then your instance cannot be stopped, it can be only rebooted or terminated (because of temporary nature of Instance-store volumes).
so to stop instance, you need to have its root volume as EBS volume.
and for that volume you will get charged, no matter if the instance is stopped or running, or even terminated - unless the volume will be terminated with the instance.
so, if you want to stop your instance, you need to have its root volume as EBS volume.
and to keep your data while instance is stopped, you need to store it on some EBS volume too.
and you will get charged for EBS anyway.
hope this helps
You are not charged for stopped instances
https://aws.amazon.com/ec2/faqs/
Q: When does billing of my Amazon EC2 systems begin and end?
Billing commences when Amazon EC2 initiates the boot sequence of an AMI instance. Billing ends when the instance terminates, which could occur through a web services command, by running "shutdown -h", or through instance failure. When you stop an instance, we shut it down but don't charge hourly usage for a stopped instance, or data transfer fees, but we do charge for the storage for any Amazon EBS volumes
When you stop an instance, we shut it down but don't charge hourly usage for a stopped instance, or data transfer fees, but we do charge for the storage for any Amazon EBS volumes. To learn more, visit the AWS Documentation.
EC2 FAQs: https://aws.amazon.com/ec2/faqs/
Relevant content
- asked 6 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago