Kishore Kanthan
Article · · 2 min read

How to allocate AWS cost for data platforms

Splitting a shared cloud bill across teams when the billing data and the usage data share no key. Then turning usage into an estimate.

One large cloud bill, mapped to the teams that drive it. Each team's usage then drops and stays down.

TL;DR

  • The bill and the usage data share no ID. So join them on the cost category.
  • Each team pays its share of each category. Shared services are overhead, split by usage.
  • Divide each category’s cost by its usage to get a rate card. Use it to estimate new work.

The problem

The bill lists cost by AWS service. The platform measures usage by team, in its own units. No column appears on both sides.

The bill and the usage data share no column. Made-up numbers.

What is on the bill

  • EC2 compute: the machines that run jobs, queries and indexes. Usually the largest line.
  • EC2 Other: disks (EBS), snapshots, NAT gateways and data transfer. Easy to miss.
  • S3: object storage for data files, logs and backups.
  • RDS: databases that hold the platform’s own metadata.
  • Small lines: CloudTrail, CloudWatch, load balancers and keys.

Map each service to a category

Both sides describe the same kinds of work. So a category links them. Tag each machine by its role, so the cost tools can split EC2.

Filled lines map to a category that teams use. The rest keep the platform running, so they are overhead.

Snapshots follow the disks they copy. An untagged line goes to overhead until someone tags it.

Split the cost

Four steps turn one bill into a cost for each team.

Here is one team:

One team's cost. It uses 500 of 2,000 in usage, so it pays 25% of the overhead too.

Platform overhead

CloudTrail, the network and the platform databases belong to no single team. No team can switch them off alone. So each team pays the same share of them as its share of usage.

Keep the overhead on its own line. Hidden inside the categories, it blurs a team’s own usage.

Check that it adds up

The team totals must add up to the bill. If they do not, a bill line has no category, or a category has no usage.

From usage to an estimate

The split says what a team spent. A rate card says what new work will cost.

For each category, divide its cost by the platform’s total usage. Pipeline compute cost 800 for 4,000 hours, so it costs 0.20 an hour. The overhead, 400 on 2,000 of usage, adds 20%.

Each rate is the category's cost divided by the platform's total usage of it.

A team that plans a new pipeline states its usage. The rate card turns it into a cost:

A new pipeline, estimated before anyone builds it. Each cost is the usage times its rate.

A smaller index or fewer runs changes one row, and the effect is clear.

We refreshed the rate card once a year, from a full year of the bill. A forecast is then the forecast usage times the rate. The monthly split still uses the real bill.

Why it helps

Each team sees its cost by category, so it knows what to fix. Here, half of all index cost is one team’s. So the first question is which of its columns need an index.

The rate card moves the cost talk earlier: before the build, not after the bill.

This is the method behind the cloud cost work.