StrataFinOps
A StrataBI Platform Module
Powered by Shaleio
Tier: Supported · module id stratafinops · type multi_page_app (an app StrataBI renders from its own pages) · requires StrataBI · stands alone
StrataFinOps gives StrataBI lightweight AWS storage and spend visibility: an S3 storage snapshot and real month-to-date spend from Cost Explorer, as native StrataBI tiles (KPI cards, tables, charts) in standard dashboard cards, with charts drawn in your theme's colors. Each page has one producer Lambda in your account that publishes a snapshot; every tile reads its piece of it. It's deliberately small — a quick read on where storage and money go, not a full FinOps product.
What you get
Open Apps → StrataFinOps. Two tabs:
| Tab | What it shows |
|---|---|
| S3 Storage | KPIs (objects, current size, storage classes, last modified), largest top-level prefixes as a chart and a table, and storage classes — a snapshot of current object metadata, not your S3 bill. |
| AWS Costs | KPIs (month to date, billing data through, services), the daily cost chart and cost by service — UnblendedCost from Cost Explorer, cached to avoid repeated billing API calls. |
The Snapshot tile says when the data was taken and its scope. Press ▷ on Refresh snapshot to rescan / re-query, then Refresh in the toolbar to reload the tiles. Tables can be downloaded as CSV. If a refresh fails, the previous snapshot stays on screen and the Refresh snapshot tile says why.
Install and update
stratactl install stratafinops # first install (shows the module terms notice)
stratactl update stratafinops --to <version>
stratactl uninstall stratafinopsRegion, account and the StrataBI system bucket are derived automatically. The install creates two Lambdas with separate least-privilege roles, uploads module.json and llm_context.txt, and registers the module.
Settings
| Setting | Default | Meaning |
|---|---|---|
s3_target_bucket | system bucket | The bucket the S3 Storage page scans. |
s3_max_objects | 2000 | Scan cap (the Lambda also enforces a ceiling). |
cost_mode | account | account for the whole account, or tag to scope by a cost-allocation tag. |
cost_tag_key / cost_tag_value | — | The activated cost-allocation tag, in tag mode. |
cost_cache_ttl_hours | 12 | How long Cost Explorer results are cached (12–24). |
s3_snapshot_ttl_minutes | 60 | Opening S3 Storage reuses a snapshot younger than this; ▷ always rescans. |
Settings live in your StrataCI bucket at config/stratafinops.auto.tfvars.json; change them and run stratactl update stratafinops. See Module settings.
Set up Cost Explorer
The S3 Storage tab works right after install. The AWS Costs tab reads Cost Explorer, which must be turned on for the account once. The install already grants the module's cost_summary role ce:GetCostAndUsage; nothing else needs IAM changes.
Standalone account. As an administrator, open Billing and Cost Management → Cost Explorer once. That enables it. AWS then needs up to 24 hours to prepare the data.
Account in an AWS Organization. Cost Explorer is controlled by the management account:
- In the management account, open Billing and Cost Management → Cost Explorer to enable it.
- Still in the management account, go to Cost Management preferences, turn on Linked account access, and save. Member accounts can then query their own costs.
- Allow up to 24 hours for data to appear in a newly enabled account.
A member account only sees its own spend. To see the whole organization, install StrataFinOps where the management account's data is available.
Check it from the account StrataFinOps runs in. Cost Explorer is always called in us-east-1:
aws ce get-cost-and-usage --region us-east-1 \
--time-period Start=$(date +%Y-%m-01),End=$(date -d tomorrow +%F) \
--granularity MONTHLY --metrics UnblendedCostAn amount means it's ready: press ▷ on Refresh snapshot on the AWS Costs tab. "User not enabled for cost explorer access" means step 1 or 2 hasn't taken effect yet.
Scope costs to a tag (optional). Activate the tag as a cost-allocation tag, in the management account for an Organization: Billing → Cost allocation tags, or aws ce update-cost-allocation-tags-status --cost-allocation-tags-status TagKey=<key>,Status=Active. A tag appears there only after resources carry it, and costs are tagged from activation forward. Then set cost_mode=tag, cost_tag_key and cost_tag_value (Module settings) and run stratactl update stratafinops.
AWS bills each Cost Explorer API request. StrataFinOps caches results for cost_cache_ttl_hours, so opening the tab doesn't make a new request each time.
AWS services
Everything below runs in your AWS account. It is created by the install unless noted.
| Service | Used for | Required |
|---|---|---|
| Amazon S3 | s3_usage lists a single configured bucket (s3:ListBucket only). | Yes |
| Amazon S3 | Both Lambdas write HTML result artifacts; cost_summary caches CE results under a module prefix. | Yes |
| AWS Cost Explorer | cost_summary reads real spend from Cost Explorer at us-east-1. Optional — the S3 page works without it. | Optional |
| AWS Lambda | The two module functions, s3_usage and cost_summary. | Yes |
| AWS IAM | Separate least-privilege roles for storage vs billing. | Yes |
| Amazon CloudWatch Logs | Runtime logs. | Yes |
It also uses pieces of your existing StrataBI install: the system S3 bucket, the module registry (DynamoDB) and, for tile results, the <name_prefix>-status-writer Lambda.
How it works
| Lambda | Does |
|---|---|
s3_usage | A bounded ListObjectsV2 scan of the target bucket; writes an HTML snapshot. Its role can list that bucket only — it never reads object contents. |
cost_summary | One grouped Cost Explorer request (us-east-1 endpoint), cached under the module's S3 prefix; writes an HTML report. Only this role has ce:GetCostAndUsage. |
Each run publishes a snapshot under runtime/modules/stratafinops/ in the system bucket: the full set is written first and then copied over current/, which the tiles read (CSV for tables and charts, Markdown for KPIs and notes). The producer tile itself follows the standard module tile contract.
Troubleshooting
- "User not enabled for cost explorer access" — Cost Explorer isn't enabled for the account, or (in an Organization) linked account access is off. See Set up Cost Explorer.
- AWS Costs is empty for a new account — data takes up to 24 hours to appear the first time.
- S3 numbers look low — the scan stops at
s3_max_objects; raise it for large buckets.
Shaleio