A small Go CLI that scans an AWS account for recurring waste, prices each item, and prints the annual total nobody at AWS adds up for you.
It checks four things:
| Check | Source | What it catches |
|---|---|---|
rightsizing |
Cost Explorer GetRightsizingRecommendation |
idle & oversized EC2 instances (AWS's own estimate) |
unattached-ebs |
EC2 DescribeVolumes |
EBS volumes in the available state |
idle-eip |
EC2 DescribeAddresses |
Elastic IPs associated with nothing |
stale-snapshot |
EC2 DescribeSnapshots |
your snapshots older than -snapshot-age days |
go install github.com/rezmoss/costsweep@latestcostsweep # scan default region, human table
costsweep -region eu-west-1 # a specific region
costsweep -format markdown # for a PR comment or GitHub step summary
costsweep -format json | jq # for a dashboard or Slack bot
costsweep -demo # no AWS needed — runs on bundled sample data
costsweep -fail-over 1000 # exit 2 if annual waste >= $1000 (CI gate)Try it with zero setup:
costsweep -demoTYPE RESOURCE REGION MONTHLY ANNUAL
------------------------------------------------------------------------------
rightsizing-terminate i-04e1f7a9c2b3d5e60 us-east-1 138.70 1664
...
------------------------------------------------------------------------------
TOTAL (13 findings) 350.30 4204
Read-only. The tool never mutates anything — it prints what you should delete.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"ce:GetRightsizingRecommendation",
"ce:GetCostAndUsage",
"ec2:DescribeVolumes",
"ec2:DescribeAddresses",
"ec2:DescribeSnapshots"
],
"Resource": "*"
}]
}Three blog posts walk through the whole thing, problem to CI gate:
- Cost Explorer, the project skeleton, and the first dollar figure
- The resource scanners — unattached volumes, idle IPs, stale snapshots
- Pricing, the report layer, and a CI gate
Estimates are exactly that — estimates. rightsizing passes through AWS's own
savings numbers; the resource checks use a small static price book (see
internal/pricing) that you can audit against the public pricing pages.
MIT