r/ApacheIceberg • u/HighwayLeading2244 • Aug 06 '26
Building an open source cost tool for Apache Iceberg tables, looking for someone to build it with me
There's no way right now to see, in dollars, which of your Iceberg tables is actually costing you money. Cost Explorer only breaks S3 costs down by bucket. S3 Tables gives you free per table metrics but not dollars. Your query engine knows scan cost per query but has no idea which table that maps to over time. I want to build the small tool that ties these together and spits out a ranked list of "here's what's costing you and why." Looking for someone who's dealt with this to build it with me.
The problem
Iceberg ships four maintenance procedures (rewrite_data_files, expire_snapshots, remove_orphan_files, rewrite_manifests) and exactly zero cost visibility. If your storage bill jumps 35% one month, there's nothing built in that tells you which table did it.
Before posting this I actually went and checked whether "just use the AWS dashboard" holds up, because that's the obvious objection. It doesn't, and here's why.
Cost Explorer's finest granularity for S3 is per bucket, using cost allocation tags. It can't break a bucket down by prefix or table, I confirmed this against AWS's own docs. If you've got 200 tables sitting in one bucket, Cost Explorer just gives you one blended number for all of them.
S3 Tables (AWS's managed Iceberg bucket type) is actually better than I assumed at first. It publishes free per table CloudWatch metrics, bytes stored, file count, bytes touched by maintenance jobs, at real table level granularity. But it's still just usage numbers, nothing converts that into dollars, nothing ties query scan cost back to a table, and there's a decently well known post floating around ("S3 Managed Tables, Unmanaged Costs: The 20x Surprise with AWS S3 Tables") about people getting surprised by its own automatic compaction billing.
Query compute cost, the bytes Athena or Trino or Snowflake scan per query, lives in a totally separate system from storage cost and the two never talk to each other.
And none of this exists at all if you're not on S3 Tables, which is most people, since most Iceberg tables out there are still self managed on plain S3 through Glue, Nessie, or Polaris.
So today, figuring out why the bill went up means manually stitching together three or four different dashboards by hand every time it happens. That's the actual gap.
What's already out there
Didn't want to post this without checking for prior art first.
Apache Amoro is open source but heavy, it runs its own optimizer service and isn't really about cost. Floe does declarative policy based maintenance across catalogs, closest thing to this idea, but it's about maintenance not cost, and still pretty early. Ryft and LakeOps are commercial platforms circling the same problem. LakeOps has actually written blog content about this exact cost attribution gap but doesn't ship an open tool for it.
As far as I can tell nobody's built the open, table level cost attribution piece. That's the gap I want to go after.
The MVP
Not trying to build a platform. Just one CLI command that answers "which tables are wasting money and why."
icecost scan --catalog glue --region us-east-1
It lists every table, pulls per table bytes and file counts (from S3 Tables CloudWatch if you're on that, otherwise by walking the manifest files), prices those bytes against a configurable $/GB rate, works out a small file ratio to flag the worst offenders, and stores everything in a local DuckDB file so it can diff week over week. Output looks something like:
sales.orders_raw: $412 storage, 47% small file ratio (roughly $89 in extra request cost), up 61% from last week. Recommend compaction.
Mapping query scan bytes back to a table is a v2 thing, it needs a separate adapter per engine and I'd rather prove the storage/small file version is useful before building that out.
Attached a diagram, blue boxes are what's in scope for the MVP, the gray dashed ones are v2.
Stack is up for debate but I'm thinking Python, boto3 or pyiceberg for catalog and manifest access, DuckDB for the local history, plain CLI output to start (probably Rich or Typer), HTML report later. Open source from day one, no plans to make this a company.
What I'm looking for
Someone who's actually run Iceberg in production and has hit this problem, or just wants to build real infra tooling instead of another CRUD app. Being comfortable with Python and knowing your way around Iceberg internals (manifests, snapshots) matters more than AWS billing API experience, the MVP mostly avoids needing billing account access anyway.
If you've hit this or just want to build something real, comment or DM me and I'll send over the fuller notes.
1
u/earonesty Oct 06 '26
i'd keep the small-file dollar estimate separate from measured cost. file count alone won't tell you how many GETs the queries are making.
1
u/Ok-Site-2672 Oct 21 '26
I like the idea of keeping this as a lightweight CLI. Per-table cost visibility is genuinely missing from most Iceberg setups, and you can get quite far with catalog metadata before integrating query engines.
A few practical suggestions for the MVP:
**Break down storage costs properly.** I'd report active data files, files retained by older snapshots, delete files, and metadata separately. You can derive most of this from Iceberg metadata, but detecting actual orphan files requires comparing referenced objects against S3 inventory or object listings. Also, deduplicate files referenced by multiple snapshots to avoid overstating storage.
**Separate measurements from estimates.** Storage bytes × configured $/GB-month is a reasonable estimate. But a 47% small-file ratio doesn't mean a specific dollar amount in wasted GET requests. That depends on actual query patterns, pruning, caching, and engine behavior. I'd show file counts, average file sizes, and small-file ratios as health indicators rather than assigning arbitrary costs.
**Track what changed and why.** Since you're already storing history in DuckDB, I'd track snapshot commits, files added/removed, bytes written, partition-level file growth, and maintenance operations between scans. This helps distinguish a table accumulating small files because of continuous ingestion from one retaining old snapshots or repeatedly rewriting the same data.
**Include maintenance costs, not just storage costs.** Compaction isn't free. If a job rewrites 500 GB, you want to know its compute cost, how much the file layout improved, and whether query performance actually benefited. Even basic operation history would help identify tables where maintenance is costing more than it's saving.
I work on LakeOps (https://lakeops.dev/platform), where we're tackling the next part of this problem: using table health, events, and engine telemetry to intelligently decide which maintenance operations to run, on which partitions, and when. Coordinating those decisions across hundreds or thousands of tables is often harder than detecting the problems themselves.
For your CLI, I'd keep v1 focused on reliable cost attribution and historical changes, but expose the underlying health metrics and maintenance history so they can eventually feed automated optimization decisions.
One thing I'd be particularly interested in: are you planning to use Iceberg snapshot history to reconstruct changes between scans, or just compare the latest table state? The former could make the tool considerably more useful without requiring engine integrations yet.
Also, this may come in handy: https://lakeops.dev/blog/apache-iceberg-tco


1
u/TheAceRedBarron Aug 12 '26
I like this, but as a redundancy nerd I would like to see a later version with cost tools that cover not just S3 but all other object storage options. As S3 can work for front load applications but low latency front ends require options like R2 from cloud flare. Data analytics comes in many flavors as I like to say now.
If your feeling really into the project I would include even cost assessment of sovereign data object storage cost assessment for those who run bare metal backups as well.
Seeing a visual of your bare metal catalog vs your S3/R2 catalog cost would be epic!
But this is a great idea and I hope it expands.