AWS spot instances - charged for self-terminated partial hours?

时间:2016-07-11 19:26:20

标签: amazon-web-services amazon-ec2

I want to start a micro instance to run a really small task (less than 5 minutes long) and then terminate itself. I plan to use spot instances (because it's cheaper), but I'm open to other alternatives.

If I do that, will I be charged for the fraction of the hour? Or will I be charged as if the instance was used for the entire hour? Also, will I be charged for the boot and termination time? or only for the time the instance was active?

I found on AWS FAQs a question that says:

- Will I be charged if my Spot Instance is terminated by Amazon EC2 before the hour is up?-

No. If the Spot Instance is terminated by Amazon EC2, you will not be charged for a partial hour of usage. However, if you terminate the instance yourself, you will be charged for any hour in which the instance ran.

In my case, the instance will be terminated by me, so I'm not sure what they meant by saying "if you terminate the instance yourself, you will be charged for any hour in which the instance ran".

1 个答案:

答案 0 :(得分:5)

Yes if you terminate the instance in fraction of hour you will be charged for whole hour. Let me give you an example.

Lets say you are using a instance for 1 Hr 20 Min.

So if AWS terminates that instance you will be charged only for 1 Hr.

But if you terminate that instance you will be charged for 2 hrs.