You finish an AWS lab late at night, close the laptop, and think you're done. Weeks later there's an email from AWS with a number you didn't expect.

Almost none of these bills come from advanced services. They come from a few resources that bill by the hour just for existing, whether or not anything is using them. Here are the five I would check first, with the maths, so you can verify it yourself on the AWS pricing page. (Prices are US East examples. Check your region.)

1. NAT gateway: about $32 a month

A NAT gateway costs about $0.045 per hour, plus a small charge per GB processed. It bills even if no traffic passes through it.

$0.045 × 24 hours × 30 days ≈ $32

Many VPC wizards and tutorials offer to create one for you, so it's easy to click through without noticing.

2. Load balancer: about $16 a month

An Application Load Balancer is about $0.0225 per hour plus usage: $0.0225 × 24 × 30 ≈ $16. "Easy deployment" tutorials often create one behind the scenes.

3. A database you only "stopped"

A small RDS instance is around $12 a month or more with storage. Stopping it isn't enough: AWS restarts a stopped RDS instance automatically after 7 days, and its storage bills the whole time. Delete it when the lab is finished.

4. Public IPv4 addresses: about $3.65 each

Since 2024 AWS charges $0.005 per hour for every public IPv4 address, whether it's attached to a running instance or sitting unused: $0.005 × 24 × 30 = $3.60 each. A typical web-app lab can have five of them, which is about $18 a month.

5. Elastic IPs left behind by a NAT gateway

When you delete a NAT gateway, its Elastic IP is freed but not released. It keeps billing until you choose Release Elastic IP addresses. This is the most commonly missed step in teardown.

Put it together

A classic "three-tier" lab (a load balancer, two EC2 instances, an RDS database, a NAT gateway and five public IPs) comes to roughly $95 a month if you forget it, from a lab that took two hours.

How to find what's billing you (10 minutes)

  1. Cost Explorer: Billing and Cost Management → Cost Explorer. (The first time, enable it. Data can take up to 24 hours to show.) Set the range to the last 7 days, granularity Daily, group by Usage type.
    • NatGateway-Hours means a NAT gateway exists.
    • LoadBalancerUsage means a load balancer exists.
    • PublicIPv4:InUseAddress or PublicIPv4:IdleAddress means public IPs.
  2. Group by Region too. A flat daily bill in a region you don't use means something is running there.
  3. Check from the command line, per region:
aws ec2 describe-nat-gateways \ --filter Name=state,Values=available,pending \ --query "NatGateways[].[NatGatewayId,VpcId]" --output table aws ec2 describe-addresses \ --query "Addresses[].[PublicIp,AllocationId,AssociationId]" --output table 

Any row returned is a resource that costs money.

How to delete in the right order

AWS blocks deletion when something depends on the resource, so order matters:

  1. Auto Scaling groups (otherwise they relaunch instances you terminate)
  2. Load balancers
  3. EC2 instances (terminate, not stop)
  4. RDS databases
  5. NAT gateways (wait until the state reads Deleted)
  6. Elastic IPs (release them)
  7. VPC endpoints and storage (volumes, then AMIs, then snapshots)
  8. The VPC last

Then check Cost Explorer again the next day. Billing data lags by hours, so a clean sweep today and a $0.00 line tomorrow together mean you're safe.

Set a $1 alert before your next lab

Create a monthly $10 budget with alerts at $1, $5 and $10, set as absolute values, not percentages. A $1 alert means something is running that shouldn't be. Alerts are a smoke detector, not a seatbelt, because billing lags, so the cleanup habit matters more than the alert.

I wrote a short playbook that puts all of this in one place: the account lockdown, the 10 services that bill by the hour, the delete order, a Notion lab log, and a 7-day plan, plus scripts and printable checklists. It's paid, so I'm telling you plainly: https://selar.com/487198w19v.
Everything in this article is free to use without it.

— Daniel Nkeng