Who is really paying for that NAT gateway?
We tested AWS Networking Flexible Cost Allocation end to end, then read the bill line by line.
Every cloud bill has a few lines that nobody owns. In AWS, the usual suspect is the shared NAT gateway. One gateway, a dozen teams behind it, and a single line item that says "data processing". Finance asks who should pay for it. Engineering shrugs.
AWS recently added a feature aimed squarely at that problem: Networking Flexible Cost Allocation (FCA). It lets you split the data-transfer and data-processing charges of a shared network resource across the people who generated the usage. We set it up in a test account, pushed real traffic through it, and compared the Cost and Usage Report (CUR) to what we sent.
The short version: the allocation is accurate where it works, and it is easy to adopt. It also has one behavior you should know about before you promise anyone a chargeback report.
What FCA does
FCA covers three resource types: NAT gateways, VPC peering connections, and EC2 instances. You create a policy that says what to report and at what granularity, then associate it with a resource.
- Resource types:
natgw,ec2,pcx(peering). - Dimensions:
data-transfer, and for NAT gateways alsodata-processing. - Granularity (pick one per policy): network interface (
eni), instance (ec2), subnet, VPC, account, or a list of CIDR ranges you label yourself (cidr). - Versions: every change creates a new version, up to 100.
The billing side needs two more things in the management or standalone account: switch on the Cost Management preference for networking flexible cost allocation, and have a CUR 2.0 data export with split cost allocation data and resource IDs.
One rule trips people up. A policy takes effect 60 minutes after you create the association, rounded up to the next hour, and it is not retroactive. Create it at 12:30 and it starts at 14:00. Plan around that, and don't expect last week's bill to change.
What we tested
We built three setups and gave each its own traffic:
- A shared NAT gateway with two private subnets labeled
team-aandteam-bby CIDR range. We pulled 10 GiB through team-a and 4 GiB through team-b. - An EC2 instance with an
ec2policy, fetching 2 GiB and 1 GiB from two peer instances in another Availability Zone. (Same-AZ traffic is free, so a same-AZ test would allocate nothing.) - An EKS cluster behind its own NAT gateway, to see how far FCA gets toward cost per workload.
Then we waited for the CUR, which took most of a day, and compared it to what we sent.
What worked
The bytes landed where they should. For the NAT gateway, the allocated inbound usage was 10.373 GB for team-a and 4.149 GB for team-b, a ratio of 2.50 against the 2.5 we sent. For EC2, the two peers got 2.015 and 1.006 GB, a ratio of 2.00. The metered numbers run about 3.7% above the payload we sent, which fits packet headers being counted.
The split reconciles to the cent. The CUR keeps a summary line for the shared resource and adds allocated lines under it. In every hour we checked, the allocated costs added up to the summary line exactly. That is the property finance cares about: the total never changes, only the breakdown.
The guard rails are sensible. The effective-time rule held on every policy we created. You can't delete a policy that still has an association. You can't associate a resource twice. The API validates structure well: it rejected 12 of 15 deliberately bad policies, from missing CIDR specs to a 101st CIDR range.
The tags are useful. Each allocated row carries the policy and version (fcap-...:1) and the account that owns the usage, so you can group by them in Athena.
What it looks like in the CUR
Allocation doesn't change the total. The report keeps one summary line for the shared resource and adds allocated lines that point back to it through split_line_item_parent_resource_id. Allocated cost is on split_line_item_split_cost. Never add it to line_item_unblended_cost, or you count the charge twice.
The NAT gateway, split by team
These are the real rows for the hour of the team-a/team-b test (the processing line is NatGateway-Bytes; GB are CUR units):
| Line item | line_item_resource_id | Usage (GB) | Cost (USD) | Parent |
|---|---|---|---|---|
| NAT gateway summary | NAT gateway ARN | 14.725 | 0.66263 | none |
| team-a, inbound | team-a | 10.373 | 0 | NAT gateway ARN |
| team-b, inbound | team-b | 4.149 | 0 | NAT gateway ARN |
| team-a, processing | team-a | 0.015 | 0.00066 | NAT gateway ARN |
| team-b, processing | team-b | 0.006 | 0.00027 | NAT gateway ARN |
| unattributed, processing | NAT gateway ARN | 14.704 | 0.6617 | NAT gateway ARN |
Each allocated row also carries two tags: aws:networking-fca:allocation-policy (the policy ID and version, for example fcap-0123456789abcdef0:1) and aws:networking-fca:allocated-account. On the unattributed row, the account tag reads (unattributed). In the export they show up as keys in the resource_tags map.
Add the cost of the last three rows: 0.6617 + 0.00066 + 0.00027 = 0.66263, the summary line. That is the reconciliation, and it held in every hour we checked. The last row is also the surprise we come back to below.
An EC2 instance, split by peer
The EC2 policy allocates a cross-AZ data transfer charge to the instances that generated it. The instance fetched 2 GiB from peer-b and 1 GiB from peer-c:
| Line item | line_item_resource_id | Usage (GB) | Cost (USD) |
|---|---|---|---|
| Instance summary | i-teamA | 3.022 | 0.02985 |
| peer-b | i-peerB | 2.015 | 0.02015 |
| peer-c | i-peerC | 1.006 | 0.00969 |
The peers split 2.00 to 1, and the split cost sums to $0.02984 against the $0.02985 summary. Peer-c's cost is a little below usage times rate because a small slice of its usage was priced at zero. We didn't chase why, so bill from the split-cost column and don't recompute it.
A Kubernetes pod with its own network interface
With eni granularity, the resource ID is interface-<id> rather than eni-<id>. In the EKS test, one pod with security groups for pods got its own branch ENI:
| Resource | line_item_resource_id | Inbound (GB) |
|---|---|---|
| Node group A's ENI | interface-<ENI-A> | 6.224 |
| Node group B's ENI | interface-<ENI-B> | 3.112 |
| Pod with its own branch ENI | interface-<BRANCH-ENI> | 4.150 |
| Plain pod on a node ENI | interface-<ENI-C> | 2.075 |
The branch-ENI pod appears as its own line. The plain pods show up only as the ENI of the node they ran on.
To pull these rows yourself in Athena (the partition column and tag columns depend on how your export table was built):
SELECT date_trunc('hour', line_item_usage_start_date) AS hr, line_item_resource_id, split_line_item_parent_resource_id AS parent_id, line_item_usage_type, split_line_item_split_usage, split_line_item_split_cost, resource_tags['aws_networking_fca_allocation_policy'] AS policy FROM <your_cur_table> WHERE billing_period = '2026-11' AND split_line_item_parent_resource_id LIKE '%natgateway/nat-%' ORDER BY 1, 3, 2; What surprised us
Almost all the NAT processing cost stayed unattributed
This is the one to read twice. In our NAT tests, 99.9% of the data-processing cost stayed on the gateway's own "unattributed" row, even though the inbound bytes were allocated to the right teams.
For the team-a/team-b hour, the NAT charged $0.66263. Of that, $0.6617 sat on the unattributed row. Team-a got $0.00066 and team-b got $0.00027. The split still reconciles, but the part that went to the teams is a rounding error. We saw the same pattern in three separate hours, across both cidr and eni granularity.
Our traffic was download-heavy: a private instance pulling large files from the internet. The allocated processing usage matched only the small request direction. We suspect that processing cost follows bytes sent by the private resource, which would make a download-dominated NAT look almost unallocated. The documentation says usage is attributed "in both directions" and doesn't mention this, so we have not confirmed the rule. We ran an upload-heavy test to settle it and will update this post with the result.
If you are planning NAT chargeback, test with your own traffic mix before you promise anyone a number.
The API accepts policies that can't be right
Overlapping CIDR ranges, the same CIDR twice, and the same label on two ranges all passed validation. A bad plan shows up only in the bill.
A new version appeared in the bill early
In one hour, some rows carried a policy version that had been created that same hour with an effective time more than an hour later. We couldn't explain it from the data. Treat the effective time as a planning guide, and check the version tag on rows from the hour you change a policy.
What it means for EKS
The question we most wanted answered: can you see network cost per Kubernetes workload? FCA has no pod granularity, so we tested how close the building blocks get.
- Default setup: everything leaves the node's address (SNAT), so the whole cluster appears as one label. Workloads can't be told apart.
- One CIDR or ENI per workload: with external SNAT on and custom networking, each workload's pods use their own subnet, and the NAT sees pod addresses. Bytes were allocated per workload. At
enigranularity we got one row per node ENI. - Security groups for pods: a pod with its own branch ENI got its own row. In the same hour a branch-ENI pod showed 4.150 GB and a plain pod on the same node 2.075 GB. This is the closest FCA gets to per-pod cost, and it applies only to pods you give a branch ENI.
- Ordinary pods sharing a node ENI can't be separated.
One practical warning: ENI IDs are not stable. The CNI deletes warm ENIs, and the ENI behind one workload's traffic no longer existed the next day. If you report by ENI, record the ENI-to-node mapping at the time of the usage.
Rolling it out
A short checklist from what we learned:
- Turn on the billing side first. The preference lives in the management account and applies organization-wide. A member account can't verify it, and a silent miss shows up as one unsplit line.
- Create the CUR export with a plain prefix. We saved ours as
/*, which produced a key Athena couldn't read. Choose something simple likecur. - Pick the granularity from the question you need answered.
cidrfor labeled teams,eniorec2for resource-level,vpcoraccountfor rollups. - Allow two to three hours before the first allocated row, and up to a day before it reaches the CUR.
- Reconcile every hour. Compare the summary line to the sum of its split rows. Never add split cost to unblended cost.
- Measure the unattributed share for your own traffic. If it is large, say so in the report.
- Change policies deliberately. Each edit is a new version with its own clock.
The verdict
FCA does what it says on the label: the allocation is accurate, reconciles exactly, and takes minutes to configure. For EC2 data transfer and for workloads you can map to a CIDR range or ENI, it is ready to use. For NAT data-processing chargeback, run it against your real traffic first, because the cost your teams carry may depend on traffic direction in ways the documentation doesn't yet say.
We'll publish the upload-test result as soon as it lands in the CUR.


