Do I get charged for stopped instances?

1

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.

질문됨 6년 전33355회 조회
3개 답변
3
수락된 답변

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

vit
답변함 6년 전
profile picture
전문가
Kallu
검토됨 2달 전
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

답변함 6년 전
profile picture
전문가
Kallu
검토됨 2달 전
0

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/

Rayyan
답변함 2달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠