3

I've t2.micro ec2 instance on AWS using ubuntu OS, also I've attached one elastic ip to that server. I know that t2.micro offers free 750 hours per month for 12 months from creating my account. The problem is that after 1 one week of creating and using t2.micro I've received an alarm for exceeding 85% of free tier package which is 641 hours. I've searched for how aws calculate hours usage and I only found that it if I stopped server it and started it in same hour it will consume 2 hours from free tier. I haven't found anything else.

Anyone can provide more details?

3

Free Tier

There's nothing complex here. One hour of EC2 t2.micro usage counts as one hour of free tier usage. EC2 billing is per minute, but it's possible that if you start and stop an instance free tier counts it as an hour. Generally EC2 instances are long lived, rarely stopped and started, so it shouldn't be an issue.

If you run two t2.micro you can run them both for half a month. You probably have multiple EC2 instances running, maybe in another region.

Tracking Down Instances

Check AWS cost explorer in the billing area. AWS Console -> top right menu -> my billing dashboard -> Cost Explorer -> Launch Cost Explorer -> Cost Explorer (left menu). It's weirdly difficult to get into.

Once in Cost Explorer click "service" on the right - click the word service not to the right. Tick "EC2-Instances" then "apply filters". From there you can click "usage type" at the top of the graph. Then look below the graph at the list.

If you can't work it out please edit your post to include screenshots of cost explorer.

| improve this answer | |
1

EC2 usage is calculated by either the hour or the second,depending on which AMI you're running.

When reviewing your EC2 usage, consider the following:

  • If your instance is billed by the hour, then you're billed for a minimum of one hour each time a new instance is started—that is, when it enters the running state.
  • If your instance is billed by the second, then you're billed for a minimum of 60 seconds each time a new instance is started—that is, when it enters the running state.

Here are a few examples for instances that are billed by the hour:

  • When you run one instance for 30 minutes and then terminate the instance, you're billed for one instance-hour.

  • When you run one instance for 10 minutes, stop the instance, and then start the instance again, you're billed for two instance-hours.

  • When you run two EC2 instances of the same type for 30 minutes each, you're billed for two instance-hours.

| improve this answer | |
  • Is that related to the hits to server? As I still cannot relate why it calculated one week as 641 hours? – Yomna Mansour Jun 15 at 22:02
  • @YomnaMansour have a look at my answer above around Cost Explorer. – Tim Jun 15 at 22:08
0

I found the problem guys, there was an instance running in other region. You can see the cost from billing dashboard -> billing details. This will tell your bill for every service.

| improve this answer | |
  • So pretty much what I said then? The billing dashboard gives similar information to cost explorer, though it's simpler. – Tim Jun 17 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.