The bill suddenly jumps
After this you can answer: How do you investigate an unexpected AWS bill without deleting the wrong resources?
Symptom
Section titled “Symptom”Diagnostic scenario: the minitickets-dev-monthly-cost budget reaches its 50% actual-spend
threshold early in the month. The threshold is a budget condition, not a recorded incident
or an AWS error response.
Read the error first
Section titled “Read the error first”AWS Budgets reports spending, not a failed request. Reach / Allowed / Password do not explain a cost increase, though an Allowed error while reading billing data means your investigating identity lacks billing access. Separate actual spend, forecast and credits before comparing numbers.
Decide
Section titled “Decide”flowchart TB A[Unexpected spending] --> B[Group by service and day] B --> C{Usage type increased?} C -->|resource hours| D[Compare uptime, size and count] C -->|requests or bytes| E[Compare traffic, retries and storage] C -->|usage unchanged| F[Check rates, credits and adjustments] D --> G[Review safe containment] E --> G F --> GLikely causes
Section titled “Likely causes”For this dev setup, start here, then follow the billed usage:
- Hourly services dominate: data, compute and entry stayed on. RDS, Valkey, tasks and ALB cost money while idle.
- Request/transfer usage dominates: traffic, retry loops or downloads increased; investigate their source.
- Storage dominates: logs, images or issued assets accumulated despite retention rules.
- Similar usage, different total: rate, credit or billing adjustments changed. The budget excludes credits, so compare like-for-like totals.
How to check
Section titled “How to check”Billing → Cost Explorer → daily costs → group by Service, then Usage type and Region. Compare equal date ranges and estimated versus finalized data. Budgets → minitickets-dev-monthly-cost → thresholds and delivery address. Match usage with ECS counts, RDS size, Logs storage and request metrics.
Replace account ID with the account being billed; use its configured local profile.
export AWS_PROFILE=ticketliteaws budgets describe-budget --account-id <account-id> --budget-name minitickets-dev-monthly-cost --query 'Budget.{Limit:BudgetLimit,Spend:CalculatedSpend,Types:CostTypes}'aws ecs describe-services --cluster minitickets-dev --services minitickets-dev-api minitickets-dev-web --query 'services[].{Name:serviceName,Running:runningCount,Desired:desiredCount}'Follow the expensive service: UpdateService, ModifyDBInstance, or creation events can
explain new capacity. CloudTrail is a change record, not the invoice; request/data activity
may need separate logging. Compare event time with billed usage, allowing for billing delay.
Contain the measured source: repair a retry loop, review excess capacity or apply the committed switches through CD. Turning data off deletes dev Postgres and Valkey; it is not a pause. Review data loss and dependencies before that choice. See cost switches.
Prevent
Section titled “Prevent”The $20 monthly budget warns at 25%, 50%, 100% actual and 100% forecast. It never stops resources.
Keep email delivery checked and review costs after changes in
infra/src/budget.ts → createBudget.
Say it in 30 seconds
Section titled “Say it in 30 seconds”Advanced: Off still has a cost and billing is delayed
The committed config currently enables data, compute and entry, with CloudFront off.
infra/index.ts decides which resources exist. Switching the main layers
off leaves queues, tables, S3 assets, ECR and the ticket-signing secret. These can still have
request, storage or standing charges; “off” is not a promise of a zero invoice.
infra/src/tickets/storage.ts → createTicketStorage keeps issued tickets
and their signing key across those switches. The bucket intentionally has no fixed-age deletion
of issued ticket PNGs. ECR and log retention bound other growth, but cannot explain every line
of an account-wide bill. Check other projects and regions too.
Budgets uses billing data updated at least daily, so alerts do not cap instantaneous spend. AWS documents its refresh cadence. Do not infer a fresh incident from a delayed budget email alone.
Read this book online: https://book.theversehub.in/