Getting started
Install spendlens and its two engines, point it at an AWS account, and run your first checks. Allow about ten minutes.
Requirements
- Python 3.11 or newer
- Steampipe with the
awsplugin, and Powerpipe - AWS credentials for a read-only role (see IAM permissions)
1. Install
# engines
brew install turbot/tap/steampipe turbot/tap/powerpipe # macOS / Linuxbrew
# or: sudo /bin/sh -c "$(curl -fsSL https://steampipe.io/install/steampipe.sh)"
# sudo /bin/sh -c "$(curl -fsSL https://powerpipe.io/install/powerpipe.sh)"
steampipe plugin install aws
# spendlens (the [ai] extra adds the AI assistant's SDKs)
python3 -m venv .venv && . .venv/bin/activate
pip install "spendlens[ai] @ git+https://github.com/devops-monk/spendlens.git"
Steampipe refuses to run as
root. On servers and in CI, run spendlens as a normal user.
2. Try it without AWS
Every command can replay bundled sample data, so you can explore before connecting an account:
spendlens tags --source demo --summary
spendlens waste --source demo
spendlens cost diff --source demo
spendlens report --source demo --out demo-report # opens as demo-report/report.html
3. Connect your AWS account
spendlens uses the AWS credential chain, so whatever works for the AWS CLI works here:
aws sso login --profile finops # or: export AWS_PROFILE=finops, or an assumed-role session
steampipe service start
Use --profile on any command, or set aws.profile in finops.yaml. For several accounts, configure a Steampipe aggregator connection and set steampipe.connection to its name.
4. Describe your standards
spendlens init # writes finops.yaml
Edit the mandatory tags, allowed instance families, budgets and AI provider. See Configuration for every option.
5. Check your setup
spendlens doctor
doctor checks Python, Steampipe, Powerpipe, the AWS plugin, your AWS identity, the Steampipe service, Cost Explorer access and the AI assistant setup. Each failed check prints its fix. spendlens doctor --offline runs only the local checks and makes no network calls.
6. Run it
spendlens tags --summary
spendlens rightsize --min-saving 20
spendlens waste
spendlens cost diff
spendlens report --out reports # everything at once, plus reports/report.html
Every live run is saved to your local history (~/.local/share/spendlens/spendlens.db), so you can re-render any report offline with --source last.
Next
- Configuration: tune thresholds to your company's standards
- AI assistant: ask questions about your spend
- CI/CD: run on a schedule and post summaries to Slack or Teams