Cloud cost audit
Goal
Show where the money goes and list the changes that cut it, each with a size, an effort and a risk.
A good audit uses the user's real numbers and checks live price pages, never remembered prices.
When to use
- A monthly bill rose or is higher than expected.
- The user wants a cost review before a budget meeting.
- Infrastructure code exists and may be oversized.
- For image size, not cloud spend, use
use_skillwithcontainer-size-diet.
Steps
- Ask with
ask_userfor the billing export or a cost explorer view grouped by service, and the period. Do not ask for credentials; ask for a file or pasted table. - Read the data with
read_fileor process a CSV withrun_command. Group by service, account, region and tag. Show the top five lines and their share. - Compare this period to the last to find what grew, and match jumps to dates of deploys or launches.
- Scan infrastructure code with
rgfor instance types, storage sizes, replica counts and NAT or load balancers per environment. - Look for the usual leaks: idle instances, unattached disks and IPs, old snapshots, oversized databases, dev environments running nights and weekends, logs with no retention, cross-region and egress traffic.
- Check that non-production sizes are smaller than production and that autoscaling has a sensible floor.
- Look at commitment options only after usage is stable. Fetch current pricing and terms with
read_urlon the provider page; never quote prices from memory. - For each idea give estimated saving using the user's figures, effort, and risk (could it break something or lose data).
- Rank by saving divided by effort, and mark ones needing a performance test first.
- If the user allows read only CLI access, use
run_commandfor list commands such as describing unattached volumes. Never delete or resize anything without explicit approval. - Add tagging advice so next month's report can be split by team.
- Summarise with a table and an owner suggestion per item.
Gotchas
- Deleting a snapshot, disk or bucket that looks unused can destroy the only copy. Confirm ownership and backups first.
- Rightsizing from average CPU ignores memory and peak load. Check peaks over a full business cycle.
- Data transfer and managed service request charges hide below the compute lines and often make the surprise.
- A reserved or committed plan on a service about to be migrated locks in waste.
- Savings estimates are a range, not a promise, because usage changes. Say so.
- Credits and discounts distort month to month comparison. Compare net and gross.
Output
- Top spend breakdown, then a ranked savings table: item, estimate, effort, risk, owner.
- Quick wins separated from projects.
- Assumptions, and the price pages checked with the date.
