Excessive billing while using EC2


Hi everyone, I am new to AWS and am trying out different free tier services for my personal learning. I created an EC2 free instance and moved my python project(using pyspark, request library) on it. I would have executed the project 2-3 times and that is it. In addition to that - I had linked my AWS account with Databricks and created S3 buckets to store files.

The EC2 instance was created on 22nd Feb 2024, and I observed today that I have a bill of 43-44$ USD.

This is truly confusing for me as I thought of EC2 as a free service. In the bill, it says some NAT gateway charges as well, which I do not understand.

I need help with this. Firstly, to stop and delete everything so I do not incur any more charges and secondly to understand what I am being charged for and how I can use free-tier services without paying extra charges.

I am a student, I am trying to learn AWS. And I do not want to use non-free se4rvices for my learning.

Thank you.

2 Answers

I thought of EC2 as a free service

EC2 isn't a free service. When your account is in its first year you can provision some low-spec'ed instances within Free Tier https://aws.amazon.com/ec2/pricing/

As part of the AWS Free Tier, you can get started with EC2 for free. This includes 750 hours of Linux and Windows t2.micro instances (t3.micro for the regions in which t2.micro is unavailable), each month for one year. To stay within the Free Tier, use only EC2 Micro instances.

All other instance types are always chargeable.

Which instance type did you use?

In the bill, it says some NAT gateway charges as well, which I do not understand.

Did you provision a NAT Gateway without properly understanding what it is? Explanation of NAT gateway is here https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html

Depending on the region a NAT Gateway can cost from 4.5c to 9.3c per hour, which may go some way to explaining how some of your costs are accrued https://aws.amazon.com/vpc/pricing/

Advice on how to stay within Free Tier is at https://repost.aws/knowledge-center/free-tier-charges

profile picture
answered 2 months ago
profile picture
reviewed 2 months ago
  • @Steve_M Thank you for your response. I missed to add one thing- I had linked my AWS account with Databricks and created S3 buckets to store files. (will update this in the original question)

    I did not create any NAT gateway. Perhaps something got created automatically with default settings.

    Should I share the bill details here?

    And please tell me how to stop the billing. I see today my bill still got increased after I terminated the EC2 instance. I am very confused

  • It's very unlikely that a NAT Gateway has been provisioned without your knowledge. AWS won't do that as a default step, you would need to have done it yourself. Does anybody else have access to the account?

    When you provisioned your EC2 instances etc. was it point-and-click in the AWS Console, or did you run a CloudFormation stack or Ansible playbook, or something like that?

    After terminating the EC2 you won't accrue any more charges for this instance. EC2 Global View will show all EC2 resources in all regions, and from here it should be possible to identify anything else that is still accruing charges https://console.aws.amazon.com/ec2globalview/home

    Detailed advice on terminating resources you don't need any more is here https://repost.aws/knowledge-center/terminate-resources-account-closure

    A drastic option if you want to terminate all running resources in your account is AWS Nuke (caution: use with care!) https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automate-deletion-of-aws-resources-by-using-aws-nuke.html


Hello, I would suggest to go to Cost Explorer and analyze your current spend (without waiting for the bill). You can approach in 2 steps.

Once you have identified what is still costing you, you can proceed deleting that resources.


answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions