Course outline · 0% complete

0/27 lessons0%

Course overview →

Free tier traps and estimating an app

lesson 8-2 · ~12 min · 23/27

The free tier, and where it bites

AWS's free tier has two different shapes, and confusing them causes real bills:

  • 12-month tier: for new accounts, e.g. 750 hours/month of a t3.micro. It expires on your account's first birthday, silently.
  • Always-free tier: permanent, e.g. 1 million Lambda requests and 25 GB stored in DynamoDB (AWS's serverless NoSQL database, which lesson 9-3 introduces properly) per month.

The classic traps, each a true story many times over:

  1. The forgotten instance. 750 free hours ≈ one instance always-on. Two instances = 1,460 hours, and hour 751 starts billing. "I stopped using it" ≠ "I stopped it".
  2. Year 13. The 12 months end, the tutorial leftovers keep running, the first real bill arrives.
  3. The NAT gateway (lesson 5-2): ~$32/month plus per-GB processing, never free, famously hiding in "basic" VPC tutorials.
  4. Data transfer out (lesson 8-1): only the first 100 GB/month is free.

The defense is one setting: a billing alarm that emails you when the forecast crosses a few dollars. Set it before you create anything else.

Free tier arithmetic

Free tiers are a subtraction with a floor at zero. A serverless API served 100,000 requests this month against Lambda's always-free allowance of 1,000,000.

requests=100000
free_requests=1000000
billable=$((requests - free_requests))
if [ $billable -lt 0 ]; then billable=0; fi
echo "requests this month: $requests"
echo "billable after free tier: $billable"
echo "Lambda bill: \$0.00"

Output

requests this month: 100000
billable after free tier: 0
Lambda bill: $0.00

The floor matters. Subtraction alone would give −900,000, and a naive bill calculation would turn that into a credit that does not exist. Clamping at zero is what "free up to a limit" actually means.

The wider point is that this API is 10 times under the limit, so traffic could grow tenfold before a single cent appears. That headroom is what makes serverless attractive for a project whose traffic you cannot predict.

The napkin estimate for a hobby app

A hobby app past its free-tier year runs one t3.micro, its 8 GB disk, the smallest single-AZ RDS Postgres, and 1 GB in S3.

# prices in cents per month, past the free-tier year
ec2=759      # one t3.micro, always on
ebs=64       # its 8 GB gp3 disk
rds=1314     # smallest Postgres
s3=23        # 1 GB of uploads
total=$((ec2 + ebs + rds + s3))
printf 'hobby app total: $%d.%02d/month\n' $((total / 100)) $((total % 100))

Output

hobby app total: $21.60/month

Reading the breakdown

  • The four numbers are cents per month, so the printf divides by 100 rather than 10000. Keeping the unit consistent within a script matters more than which unit you pick.
  • The database is well over half the total at $13.14. That is the managed-service premium from lesson 6-1 showing up on a small bill, where it is proportionally largest.
  • $21.60 a month is the number that makes people choose. Either they accept roughly $22 as tuition for a real production-shaped stack, or they move the hobby app to lesson 9-3's zero-idle serverless stack.

One always-on instance, to the nearest dollar

730 hours × $0.0104 = $7.59, which rounds to $8.

That figure is worth internalizing as a unit of measurement: one always-on smallest-size instance is about $8 a month. Most estimates you will be asked for in conversation are multiples of it.

Extending the unit gives the next useful landmark. A hobby app with an instance, a disk, and a small RDS database lands near $25 a month, which is often the exact moment people discover lesson 7-1's zero-when-idle pricing and start asking whether the instance needs to exist at all.

The only genuinely free workload on an old account

The workload that is genuinely $0.00 is a Lambda API handling 500,000 requests a month, within always-free limits.

Lambda's million free requests are always-free rather than 12-month, so the account's age is irrelevant. 500,000 is half the allowance.

Each of the others fails for its own reason, and each maps to one of this lesson's traps:

  • The t3.micro's free hours died with year one, which is trap 2. On a 3-year-old account it bills the full $7.59.
  • The NAT gateway bills about $32 a month simply for existing, which is trap 3, and it is never covered by any free tier.
  • 500 GB of transfer out is 400 GB past the free allowance, roughly $36, which is trap 4.