Learn/Operations
Operations · 12 min read · August 2026
Cost Explorer, Budgets, and Not Blowing Free Tier
How AWS Billing, Cost Explorer, and Budgets work so a chapter lab does not become an invoice. Defaults, filters, and a $1 alarm.
Source. AWS Billing and Cost Management · Cost Explorer · AWS Budgets · Free Tier
Abstract & theoretical context
Every AWS account has a bill. Cost Explorer visualizes historical spend; Budgets alerts on forecasted or actual cost; Free Tier is a set of always-free and 12-month offers, not a shield against NAT Gateways, unattached gp3 volumes, or idle load balancers. Student chapters lose members to surprise invoices. This lab follows official billing docs: enable Cost Explorer, create a zero-spend or $1 budget, tag lab resources, and read the bill by service and Region.
Models, formulas & variables
1. Bill
Invoice ≈ Σ (usage × unit_price × Region_factor) + tax − credits
- — Data transfer and NAT often dominate ‘I only launched a t3.micro’ stories.
- — Free Tier remaining is not shown the same way for every service. Read the bill line.
2. Budget
Alert if Actual_or_Forecast ≥ threshold × budget_amount
- — Email is the minimum action. SNS can page a lead.
- — Filter the budget to a tag (chapter=sbg-tcet) once tagging is a habit.
Reference implementation
Copy into a sandbox account. Pin Region ap-south-1 unless the lab says otherwise.
budget-check.sh
AWS CLI · bash
aws ce get-cost-and-usage \
--time-period Start=$(date -d '7 days ago' +%Y-%m-%d),End=$(date +%Y-%m-%d) \
--granularity DAILY \
--metrics UnblendedCost \
--group-by Type=DIMENSION,Key=SERVICE
aws budgets describe-budgets --account-id $(aws sts get-caller-identity --query Account --output text)Lab procedure
- 01Open Billing → Bills. Filter last 7 days by Region ap-south-1.
- 02Enable Cost Explorer if it is not already (it can take up to 24 hours to populate).
- 03Create an AWS Budget: $1 actual, email the founder and operations director.
- 04List EC2, EBS, ELB, NAT in the account. Terminate leftovers from prior labs.
- 05Agree as a chapter: no NAT Gateway in a two-hour workshop without a destroy checklist.
Key insights
- Cost Explorer is delayed. The bill is the source of truth for ‘did we delete it?’.
- Always-free Lambda/DynamoDB still has account-level other services.
- Tags do not reduce cost. They make the next invoice explainable.
Account & lab requirements
Billing access (or a mentor with it). Students should not share root.