Reputation: 299
Simple question:
If I had six identical EC2 instances process data for exactly ten minutes and turn off would I be charged six hours or one hour?
Upvotes: 9
Views: 5668
Reputation: 41428
Update: EC2 and EBS are now based on usage down to the second
Old answer Granularity for changes are measure down to the hour.
From the AWS pricing site http://aws.amazon.com/ec2/pricing/:
Pricing is per instance-hour consumed for each instance, from the time an instance is launched until it is terminated or stopped. Each partial instance-hour consumed will be billed as a full hour.
Unless you are calculating time to be under a threshold for a free tier, the second you use an EC2 instance you're charged for the full hour. If you go one second over the first hour, your charged for a full second hour.
One caveat: Spot Instances.
If spot instances are interrupted by AWS (not you) before reaching a full hour use, you're not charged at all. If you interrupt the spot instance, you're charge for the partial hour usage (which is a full hour rounded up as per the on-demand instances).
Upvotes: 6
Reputation: 1527
You always get 750 hours per month for all your ec2 instances.
Different cases:
Case 1: Your have created and running one instance for 10 minutes.And then stopped.
It will be counted as 1 hour.
Case 2: Your have two running instances for each for 5 or 10 minutes and then stopped. It will be counted as 2 hours.
Case 3: You have one instance running for 10 minutes, then stopped and then again started for 10 or 5 minutes. It will be counted as 2 hours.
You can only use t2.micro servers and some limited OS in free tier.
This way, you can prevent your unwanted billing.
I hope, this has cleared some doubts.
Note: This is just my understanding till today. Please check their(aws) pricing docs for updated information.
Upvotes: 0
Reputation: 21
AWS has introduced per second billing for EC2/EBS effective October 2, 2017.
Upvotes: 2