AWS Builder Center
I automated AWS cost alerts in 15 minutes. Here's the exact setup.

I automated AWS cost alerts in 15 minutes. Here's the exact setup.

A step-by-step guide to setting up AWS Budgets and SNS so you get a text or email the moment your bill crosses a threshold you set.

Running AWS as a student or solo builder, the scariest thing isn't a bug. It's opening the console and finding a bill you didn't expect. Here's the setup I use to catch that before it happens, and it takes about 15 minutes.

What you'll need

  • An AWS account (Free Tier is fine)
  • 15 minutes
  • An email address or phone number for alerts

Step 1: Create a budget

Go to Billing and Cost Management → Budgets → Create budget. Pick Cost budget, set a monthly amount (I use $5 as a tripwire, since Free Tier usage should rarely get close), and set the period to monthly.

Step 2: Set alert thresholds

Add alert thresholds at 50%, 80%, and 100% of your budget, both for actual and forecasted spend. Forecasted spend catches a problem before it happens; actual spend confirms it did.

Step 3: Connect SNS for instant notifications

Budgets can email you directly, but I wanted something faster, so I wired it to SNS:
  1. Go to SNS → Topics → Create topic (Standard type).
  2. Create a subscription on that topic: choose Email, or SMS if your region supports it.
  3. Confirm the subscription from the email or text you receive.
  4. Back in your budget's alert settings, add that SNS topic as a notification target.

Step 4: Test it

Lower the threshold temporarily to something you'll hit immediately, confirm the alert arrives, then set it back. Skipping this step means you won't know it's broken until the bill you were trying to avoid.

What I'd add next

I'm looking into pairing this with a Lambda function that automatically stops specific non-critical resources when a threshold is breached, instead of just alerting. If anyone has already built something like that, I'd like to see it.

Questions for you

  • What threshold do you set for your own tripwire budget?
  • Has a budget alert ever actually saved you from a surprise bill? What happened?
  • Anyone doing auto-remediation (stopping resources automatically) and willing to share how?
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article