By using AWS re:Post, you agree to the Terms of Use

Do I get charged for stopped instances?

0

This is probably a basic question, but I want to know if I get charged for stopped EC2 instances.
I saw somewhere that I would only get charged for EBS storage, but I don't understand what that storage is. If I spin up some c5.xlarge machine, will I get charged for that if I stop it?

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.

asked 5 years ago475 views
2 Answers
1
Accepted Answer

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

answered 5 years ago
0

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

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions