Thuta Learning
AdvancedDevOpsbeginner

Cost Management & Billing

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand Cost Management & Billing without any of the intimidation
  • Get comfortable running things yourself in the AWS CLI/Console
  • Be ready to apply this concept in a real project right away

Let's think about this for a second

AWS's pay-as-you-go pricing is flexible, but if you don't monitor it, you can end up facing an unexpected bill — you should set up a Billing Alert (pairing a CloudWatch Alarm with a billing metric) as soon as you create your account (it emails you when a threshold is crossed). AWS Budgets lets you set a monthly/custom-period spending limit — as you approach that limit (say, at 80%), it sends you a notification. Cost Explorer is a dashboard that lets you visualize which service is costing you how much (a breakdown by service/region/tag).

Let's connect this to a real scenario

If you set a Monthly Budget of $10 with an email alert at 80% ($8) — instead of forgetting an EC2/RDS instance running during practice and suddenly facing a $50 bill, you'll get an early heads-up email notification once you hit $8. If Cost Explorer shows EC2 as your biggest cost driver, you can plan to right-size your instance type (or find and delete unused instances).

Let's look at this together

bash
# Create a monthly budget with an alert at 80% usage
aws budgets create-budget \
  --account-id 123456789012 \
  --budget '{
    "BudgetName": "tutorial-monthly-budget",
    "BudgetLimit": {"Amount": "10", "Unit": "USD"},
    "TimeUnit": "MONTHLY",
    "BudgetType": "COST"
  }' \
  --notifications-with-subscribers '[{
    "Notification": {"NotificationType": "ACTUAL", "ComparisonOperator": "GREATER_THAN", "Threshold": 80},
    "Subscribers": [{"SubscriptionType": "EMAIL", "Address": "you@example.com"}]
  }]'
You should see
$ (email) Subject: AWS Budgets: tutorial-monthly-budget has exceeded 80% of your budgeted amount

Try it in 5 minutes

Set up a $5-$10 monthly Budget (with an 80% threshold email alert) in the AWS Console — open Cost Explorer and check which services have been costing you so far.

A quick word of caution

Set up your Billing Alert/Budget right when you create your account — 'I'll set it up later' is exactly the kind of delay that leads to an unexpected bill, and it's one of the most common mistakes new AWS users make.

Easy traps

  • Skipping Billing Alert/Budget setup and just continuing to practice — if you forget a resource running somewhere, you might not notice the bill until much later
  • Setting a Budget but not subscribing to email notifications — the alert fires, but nobody ever sees it

Now try it yourself

Set up a $5-$10 monthly Budget (with an 80% threshold email alert) in the AWS Console — open Cost Explorer and check which services have been costing you so far.

You'll know it worked when: $ (email) Subject: AWS Budgets: tutorial-monthly-budget has exceeded 80% of your budgeted amount

Cost Management & Billing | Thuta Learning