-1

So I am running a nodejs discord bot on AWS EC2 (free tier). I would want to stay in free range as much as possible. In the billing section I came across my usage and found that I am using 8.35 gb. There are 2 instances linked to my account out of which only 1 is running (I used other one to host an AI app which is in stop state). Both instances are allocated 30 gb separately. I ran df -h in both instances, one reported 2.8 gb occupied and other reported 2gb occupied. So the quick question is why is it 8.35 gb when it should be around 5gb?

Attached a screenshot of bills section. enter image description here

Please help. What is it that I am missing?

Parth
  • 39
  • 10

2 Answers2

3

I assume you are referring to Amazon EBS Volumes, for which the AWS Free Tier provides 30GB per month for the first 12 months of your account.

This can be one 30GB volume for an entire month, or 2x15GB volumes for one month, or 1x900GB volume for one day (900* 1/30 = 30). Hence the term "GB-month", which means "Gigbytes for a month".

The fact that you are 8/30 for the allocation means that your account has consumed 8GB-month our of the free 30GB-month.

Don't panic too much -- the cost is only 10c/GB-month, so a 30GB volume for an entire month would cost $3.

Please note that Amazon EBS Volumes are charged based on provisioned storage. So, as soon as you create the volume, the space has been allocated and your account will be charged for it, even if nothing has yet been stored in the volume.

If you wish to minimise costs, then minimise the size of each volume and minimise the number of volumes. The purpose of the Free Tier is to provide a trial of AWS services -- it is not intended to be enough to run your on-going applications.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
1

You are probably looking in the wrong place. When you say "I am using 8.35 gb" I assume you are talking about EBS storage, right? What you see in AWS billing, it is provisioned storage (that is, what you allocated when you launched the instance). It doesn't matter how much you are using - that's what df -h shows you inside the box. Also, it doesn't matter whether the instance is running or stopped - you are still incurring charges for EBS (if it is beyond free tier).

By the way, 8.3GB is what is usually allocated for each Linux instance; so having 8.3GB for two looks suspiciously small

UPDATE: It's not 8 GB that you see - it is 8GB-Mo. So, if you provisioned 30GB, then on the 8th of the month you will see 8GB-Mo (I think AWS updates every 4 hours). Therefore, by the end of the month you will have approximately 30GB-Mo, which is the limit for free tier.

Felix
  • 9,248
  • 10
  • 57
  • 89
  • Oh sry. Each instance is allocated 30 gb (The max that EBS provides for free?) and the billing section reports 8.35/30 GB-Mo. I think 8.35 is reported for both instances combined but then going by df -h it should be around 5 gb. Also since there are 2 instances with 30 gb each, why billing section is displaying storage used out of 30 gb instead of 60 gb? Is it that each instance has its own billing section? – Parth May 09 '21 at 05:54
  • 1
    first, forget about `df -h`. It is irrelevant to billing charges. Second, note that today is only 8th (or 9th, depending where in the world you are) - GB-Mo is 8/30 of your allowance. So, it looks like it will be 30GB by the end of the month... you are within limits – Felix May 09 '21 at 06:07
  • what does gb-mo notation mean anyway? Sry english is my third langauge. Suppose its showing 6.6 gb today on 8th of this month. Thanks for bearing me. – Parth May 09 '21 at 06:30
  • it's gigabytes **per month**. If you launch one instance with 30GB of EBS storage and run it for a month, you will get 30GB-Mo. Or 1GB-Mo after 1 day. And if you add storage, or terminate instance, or whatever - the number will change. There is much more here (please read before asking): https://aws.amazon.com/ebs/pricing/ – Felix May 09 '21 at 06:34