<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Manak Wadhwa</title>
    <description>The latest articles on DEV Community by Manak Wadhwa (@maanak).</description>
    <link>https://dev.to/maanak</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3673784%2Fc6c36a5d-b513-44db-bfbb-1878e53b6ad0.png</url>
      <title>DEV Community: Manak Wadhwa</title>
      <link>https://dev.to/maanak</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maanak"/>
    <language>en</language>
    <item>
      <title>Who is really paying for that NAT gateway? Testing AWS Networking Flexible Cost Allocation</title>
      <dc:creator>Manak Wadhwa</dc:creator>
      <pubDate>Fri, 20 Nov 2026 12:15:37 +0000</pubDate>
      <link>https://dev.to/maanak/who-is-really-paying-for-that-nat-gateway-testing-aws-networking-flexible-cost-allocation-50mp</link>
      <guid>https://dev.to/maanak/who-is-really-paying-for-that-nat-gateway-testing-aws-networking-flexible-cost-allocation-50mp</guid>
      <description>&lt;h1&gt;
  
  
  Who is really paying for that NAT gateway?
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;We tested AWS Networking Flexible Cost Allocation end to end, then read the bill line by line.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;AWS recently added a feature aimed squarely at that problem: &lt;strong&gt;Networking Flexible Cost Allocation (FCA)&lt;/strong&gt;. 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What FCA does
&lt;/h2&gt;

&lt;p&gt;FCA covers three resource types: NAT gateways, VPC peering connections, and EC2 instances. You create a &lt;strong&gt;policy&lt;/strong&gt; that says what to report and at what granularity, then &lt;strong&gt;associate&lt;/strong&gt; it with a resource.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Resource types:&lt;/strong&gt; &lt;code&gt;natgw&lt;/code&gt;, &lt;code&gt;ec2&lt;/code&gt;, &lt;code&gt;pcx&lt;/code&gt; (peering).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dimensions:&lt;/strong&gt; &lt;code&gt;data-transfer&lt;/code&gt;, and for NAT gateways also &lt;code&gt;data-processing&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Granularity (pick one per policy):&lt;/strong&gt; network interface (&lt;code&gt;eni&lt;/code&gt;), instance (&lt;code&gt;ec2&lt;/code&gt;), subnet, VPC, account, or a list of CIDR ranges you label yourself (&lt;code&gt;cidr&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versions:&lt;/strong&gt; every change creates a new version, up to 100.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;One rule trips people up. A policy takes effect &lt;strong&gt;60 minutes after you create the association, rounded up to the next hour&lt;/strong&gt;, 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we tested
&lt;/h2&gt;

&lt;p&gt;We built three setups and gave each its own traffic:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A shared NAT gateway&lt;/strong&gt; with two private subnets labeled &lt;code&gt;team-a&lt;/code&gt; and &lt;code&gt;team-b&lt;/code&gt; by CIDR range. We pulled 10 GiB through team-a and 4 GiB through team-b.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An EC2 instance&lt;/strong&gt; with an &lt;code&gt;ec2&lt;/code&gt; policy, 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.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An EKS cluster&lt;/strong&gt; behind its own NAT gateway, to see how far FCA gets toward cost per workload.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then we waited for the CUR, which took most of a day, and compared it to what we sent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What worked
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The bytes landed where they should.&lt;/strong&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The split reconciles to the cent.&lt;/strong&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The guard rails are sensible.&lt;/strong&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The tags are useful.&lt;/strong&gt; Each allocated row carries the policy and version (&lt;code&gt;fcap-...:1&lt;/code&gt;) and the account that owns the usage, so you can group by them in Athena.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like in the CUR
&lt;/h2&gt;

&lt;p&gt;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 &lt;code&gt;split_line_item_parent_resource_id&lt;/code&gt;. Allocated cost is on &lt;code&gt;split_line_item_split_cost&lt;/code&gt;. Never add it to &lt;code&gt;line_item_unblended_cost&lt;/code&gt;, or you count the charge twice.&lt;/p&gt;

&lt;h3&gt;
  
  
  The NAT gateway, split by team
&lt;/h3&gt;

&lt;p&gt;These are the real rows for the hour of the team-a/team-b test (the processing line is &lt;code&gt;NatGateway-Bytes&lt;/code&gt;; GB are CUR units):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line item&lt;/th&gt;
&lt;th&gt;&lt;code&gt;line_item_resource_id&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Usage (GB)&lt;/th&gt;
&lt;th&gt;Cost (USD)&lt;/th&gt;
&lt;th&gt;Parent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;NAT gateway summary&lt;/td&gt;
&lt;td&gt;NAT gateway ARN&lt;/td&gt;
&lt;td&gt;14.725&lt;/td&gt;
&lt;td&gt;0.66263&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;team-a, inbound&lt;/td&gt;
&lt;td&gt;&lt;code&gt;team-a&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;10.373&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;NAT gateway ARN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;team-b, inbound&lt;/td&gt;
&lt;td&gt;&lt;code&gt;team-b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;4.149&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;NAT gateway ARN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;team-a, processing&lt;/td&gt;
&lt;td&gt;&lt;code&gt;team-a&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0.015&lt;/td&gt;
&lt;td&gt;0.00066&lt;/td&gt;
&lt;td&gt;NAT gateway ARN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;team-b, processing&lt;/td&gt;
&lt;td&gt;&lt;code&gt;team-b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0.006&lt;/td&gt;
&lt;td&gt;0.00027&lt;/td&gt;
&lt;td&gt;NAT gateway ARN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;unattributed, processing&lt;/td&gt;
&lt;td&gt;NAT gateway ARN&lt;/td&gt;
&lt;td&gt;14.704&lt;/td&gt;
&lt;td&gt;0.6617&lt;/td&gt;
&lt;td&gt;NAT gateway ARN&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each allocated row also carries two tags: &lt;code&gt;aws:networking-fca:allocation-policy&lt;/code&gt; (the policy ID and version, for example &lt;code&gt;fcap-0123456789abcdef0:1&lt;/code&gt;) and &lt;code&gt;aws:networking-fca:allocated-account&lt;/code&gt;. On the unattributed row, the account tag reads &lt;code&gt;(unattributed)&lt;/code&gt;. In the export they show up as keys in the &lt;code&gt;resource_tags&lt;/code&gt; map.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  An EC2 instance, split by peer
&lt;/h3&gt;

&lt;p&gt;The EC2 policy allocates a cross-AZ data transfer charge to the instances that generated it. The instance fetched 2 GiB from &lt;code&gt;peer-b&lt;/code&gt; and 1 GiB from &lt;code&gt;peer-c&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line item&lt;/th&gt;
&lt;th&gt;&lt;code&gt;line_item_resource_id&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Usage (GB)&lt;/th&gt;
&lt;th&gt;Cost (USD)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Instance summary&lt;/td&gt;
&lt;td&gt;&lt;code&gt;i-teamA&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;3.022&lt;/td&gt;
&lt;td&gt;0.02985&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;peer-b&lt;/td&gt;
&lt;td&gt;&lt;code&gt;i-peerB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2.015&lt;/td&gt;
&lt;td&gt;0.02015&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;peer-c&lt;/td&gt;
&lt;td&gt;&lt;code&gt;i-peerC&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.006&lt;/td&gt;
&lt;td&gt;0.00969&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Kubernetes pod with its own network interface
&lt;/h3&gt;

&lt;p&gt;With &lt;code&gt;eni&lt;/code&gt; granularity, the resource ID is &lt;code&gt;interface-&amp;lt;id&amp;gt;&lt;/code&gt; rather than &lt;code&gt;eni-&amp;lt;id&amp;gt;&lt;/code&gt;. In the EKS test, one pod with security groups for pods got its own branch ENI:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;&lt;code&gt;line_item_resource_id&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Inbound (GB)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Node group A's ENI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;interface-&amp;lt;ENI-A&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;6.224&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node group B's ENI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;interface-&amp;lt;ENI-B&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;3.112&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pod with its own branch ENI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;interface-&amp;lt;BRANCH-ENI&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;4.150&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plain pod on a node ENI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;interface-&amp;lt;ENI-C&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2.075&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The branch-ENI pod appears as its own line. The plain pods show up only as the ENI of the node they ran on.&lt;/p&gt;

&lt;p&gt;To pull these rows yourself in Athena (the partition column and tag columns depend on how your export table was built):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="nb"&gt;date_trunc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'hour'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;line_item_usage_start_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;hr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;line_item_resource_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;split_line_item_parent_resource_id&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;parent_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;line_item_usage_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;split_line_item_split_usage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;split_line_item_split_cost&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;resource_tags&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'aws_networking_fca_allocation_policy'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;your_cur_table&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;billing_period&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'2026-11'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;split_line_item_parent_resource_id&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'%natgateway/nat-%'&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What surprised us
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Almost all the NAT processing cost stayed unattributed
&lt;/h3&gt;

&lt;p&gt;This is the one to read twice. In our NAT tests, &lt;strong&gt;99.9% of the data-processing cost stayed on the gateway's own "unattributed" row&lt;/strong&gt;, even though the inbound bytes were allocated to the right teams.&lt;/p&gt;

&lt;p&gt;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 &lt;code&gt;cidr&lt;/code&gt; and &lt;code&gt;eni&lt;/code&gt; granularity.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;If you are planning NAT chargeback, test with your own traffic mix before you promise anyone a number.&lt;/p&gt;

&lt;h3&gt;
  
  
  The API accepts policies that can't be right
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  A new version appeared in the bill early
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it means for EKS
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Default setup:&lt;/strong&gt; everything leaves the node's address (SNAT), so the whole cluster appears as one label. Workloads can't be told apart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One CIDR or ENI per workload:&lt;/strong&gt; 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 &lt;code&gt;eni&lt;/code&gt; granularity we got one row per node ENI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security groups for pods:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ordinary pods sharing a node ENI&lt;/strong&gt; can't be separated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rolling it out
&lt;/h2&gt;

&lt;p&gt;A short checklist from what we learned:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Turn on the billing side first.&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create the CUR export with a plain prefix.&lt;/strong&gt; We saved ours as &lt;code&gt;/*&lt;/code&gt;, which produced a key Athena couldn't read. Choose something simple like &lt;code&gt;cur&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick the granularity from the question you need answered.&lt;/strong&gt; &lt;code&gt;cidr&lt;/code&gt; for labeled teams, &lt;code&gt;eni&lt;/code&gt; or &lt;code&gt;ec2&lt;/code&gt; for resource-level, &lt;code&gt;vpc&lt;/code&gt; or &lt;code&gt;account&lt;/code&gt; for rollups.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Allow two to three hours before the first allocated row, and up to a day before it reaches the CUR.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reconcile every hour.&lt;/strong&gt; Compare the summary line to the sum of its split rows. Never add split cost to unblended cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure the unattributed share for your own traffic.&lt;/strong&gt; If it is large, say so in the report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Change policies deliberately.&lt;/strong&gt; Each edit is a new version with its own clock.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The verdict
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;We'll publish the upload-test result as soon as it lands in the CUR.&lt;/p&gt;




</description>
      <category>aws</category>
      <category>networking</category>
      <category>finops</category>
    </item>
    <item>
      <title>Demystifying CloudFront Costs: From Edge Architecture to Smart Pricing Decisions</title>
      <dc:creator>Manak Wadhwa</dc:creator>
      <pubDate>Wed, 28 Jan 2026 09:00:39 +0000</pubDate>
      <link>https://dev.to/maanak/demystifying-cloudfront-costs-from-edge-architecture-to-smart-pricing-decisions-442d</link>
      <guid>https://dev.to/maanak/demystifying-cloudfront-costs-from-edge-architecture-to-smart-pricing-decisions-442d</guid>
      <description>&lt;p&gt;The global content delivery network (CDN) market continues to grow rapidly, driven by streaming media, e-commerce performance requirements, and cloud-native application architectures. As organisations scale globally, CDNs have become a foundational component for delivering fast, reliable, and secure user experiences.&lt;br&gt;
Amazon CloudFront is widely adopted for this purpose. While CloudFront is straightforward to deploy, its pricing model can be difficult to predict without a clear understanding of its underlying cost drivers. Monthly spend is influenced by traffic volume, geographic distribution, request patterns, caching behaviour, and optional features such as edge compute, logging, and security controls.&lt;br&gt;
This article explains how CloudFront pricing works in practical terms and outlines proven strategies to manage and optimise costs at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Amazon CloudFront?
&lt;/h2&gt;

&lt;p&gt;Amazon CloudFront is AWS's content delivery network. It accelerates delivery of web content, APIs, video, and static assets by caching data at a global network of edge locations. Instead of every request reaching the origin infrastructure, users are served from a nearby edge location whenever possible, reducing latency and backend load.&lt;br&gt;
CloudFront operates hundreds of edge locations worldwide, enabling low-latency delivery across regions while integrating tightly with AWS services such as Amazon S3, Application Load Balancers, and EC2.&lt;/p&gt;

&lt;h2&gt;
  
  
  How CloudFront Delivers&amp;nbsp;Content
&lt;/h2&gt;

&lt;p&gt;At a high level, CloudFront improves performance by minimizing the distance between users and content.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request routing: Each viewer request is routed to the nearest available edge location.&lt;/li&gt;
&lt;li&gt;Cache hits and misses: If the requested object is already cached at the edge, it is served immediately. If not, CloudFront retrieves it from the origin and caches it for subsequent requests.&lt;/li&gt;
&lt;li&gt;Regional edge caches: An additional caching layer reduces repeated origin fetches and improves efficiency for less frequently accessed content.&lt;/li&gt;
&lt;li&gt;Edge logic: CloudFront supports lightweight and advanced request/response customisation through edge compute capabilities, allowing logic to run closer to the user when required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding this flow is essential because most CloudFront costs are directly tied to how often requests are served from the cache versus the origin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Organisations Use CloudFront
&lt;/h2&gt;

&lt;p&gt;CloudFront is commonly used to improve global content delivery while maintaining operational simplicity within AWS environments.&lt;br&gt;
Key benefits include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lower latency by serving cached content from nearby edge locations&lt;/li&gt;
&lt;li&gt;Reduced load on origin infrastructure by offloading repeat requests&lt;/li&gt;
&lt;li&gt;Better resilience during traffic spikes through distributed delivery&lt;/li&gt;
&lt;li&gt;Native integration with AWS deployment pipelines and infrastructure tooling&lt;/li&gt;
&lt;li&gt;Enhanced security through HTTPS delivery and optional protections&lt;/li&gt;
&lt;li&gt;Strong observability through metrics and logs for troubleshooting and analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For many teams, these advantages outweigh the complexity of pricing - provided costs are actively monitored and optimised.&lt;/p&gt;

&lt;h2&gt;
  
  
  CloudFront Pricing&amp;nbsp;Models
&lt;/h2&gt;

&lt;p&gt;CloudFront pricing generally falls into two categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Usage-Based (Legacy) Billing.&lt;/li&gt;
&lt;li&gt;Flat-Rate Billing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are fundamentally different pricing approaches. Neither is universally "better" - the right choice depends on traffic predictability, scale, and operational maturity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4rozl20n73c1rg98twm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4rozl20n73c1rg98twm.jpg" alt=" " width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  When Usage-Based (Pay-as-You-Go / Legacy) Billing Makes&amp;nbsp;Sense
&lt;/h2&gt;

&lt;p&gt;Usage-based pricing charges strictly for what you consume: data transfer out, request volume, and optional features. This model is best suited when flexibility matters more than predictability.&lt;br&gt;
Usage-based billing is a good fit when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traffic volume is variable or unpredictable (seasonal spikes, launches, campaigns)&lt;/li&gt;
&lt;li&gt;You are an early-stage or experimenting with workloads&lt;/li&gt;
&lt;li&gt;Traffic is moderate and well below flat-plan thresholds&lt;/li&gt;
&lt;li&gt;You want fine-grained cost attribution per workload, environment, or customer&lt;/li&gt;
&lt;li&gt;You actively optimise caching, assets, and request patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Typical examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SaaS platforms with uneven customer activity&lt;/li&gt;
&lt;li&gt;Marketing-heavy websites with campaign-driven traffic&lt;/li&gt;
&lt;li&gt;New products still finding their steady-state usage&lt;/li&gt;
&lt;li&gt;Engineering teams that want direct visibility into cost drivers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Trade-off:&lt;/strong&gt;&lt;br&gt;
Costs can fluctuate month to month and require active monitoring to avoid surprises.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Flat-Rate Billing Makes&amp;nbsp;Sense
&lt;/h2&gt;

&lt;p&gt;Flat-rate plans bundle CloudFront delivery with predefined allowances and supporting services, trading some flexibility for predictability.&lt;br&gt;
Flat-rate billing is a good fit when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traffic volume is high and stable&lt;/li&gt;
&lt;li&gt;You operate at global or enterprise scale&lt;/li&gt;
&lt;li&gt;Budget predictability is more important than per-GB optimization&lt;/li&gt;
&lt;li&gt;CDN usage is business-critical and always-on&lt;/li&gt;
&lt;li&gt;Finance teams prefer fixed monthly spend over variable cloud bills&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Typical examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Media streaming platforms&lt;/li&gt;
&lt;li&gt;Large e-commerce sites with steady global traffic&lt;/li&gt;
&lt;li&gt;Mature SaaS products with predictable usage baselines&lt;/li&gt;
&lt;li&gt;Organisations with strict budget governance or chargeback models&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Trade-off:&lt;br&gt;
You may pay for unused capacity during low-traffic periods, and there is less incentive to aggressively optimise marginal usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Primary Factors That Drive CloudFront Cost
&lt;/h2&gt;

&lt;p&gt;Several variables determine total CloudFront spend:&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Transfer&amp;nbsp;Out
&lt;/h2&gt;

&lt;p&gt;The volume of data delivered from edge locations to users is usually the largest cost component, especially for media-heavy workloads. Rates vary by geographic region.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTTP and HTTPS&amp;nbsp;Requests
&lt;/h2&gt;

&lt;p&gt;Each viewer request processed by CloudFront is billed. High-traffic sites with inefficient caching or fragmented assets can accumulate significant request charges.&lt;/p&gt;

&lt;h2&gt;
  
  
  Edge Compute
&lt;/h2&gt;

&lt;p&gt;Running logic at the edge adds cost based on invocation count and execution time. Lightweight functions are inexpensive individually but can add up at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logging and Monitoring
&lt;/h2&gt;

&lt;p&gt;Real-time delivery logs are valuable for analytics and troubleshooting, but costs grow with traffic volume.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache Invalidation
&lt;/h2&gt;

&lt;p&gt;Frequent invalidations can increase costs and reduce cache efficiency, especially when broad patterns are used.&lt;br&gt;
Understanding which of these dominates your bill is the first step toward optimization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing Controls That Affect Cost and Performance
&lt;/h2&gt;

&lt;p&gt;CloudFront allows you to limit which edge locations can serve your content through Price Classes. This is a direct trade-off between global performance and cost.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Global coverage provides the best latency worldwide but incurs higher regional rates.&lt;/li&gt;
&lt;li&gt;Restricted coverage limits delivery to lower-cost regions and is often sufficient when traffic is concentrated in North America and Europe.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mapping user geography before selecting a price class prevents paying premium rates for regions with little or no traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Estimating CloudFront Costs
&lt;/h2&gt;

&lt;p&gt;The AWS Pricing Calculator is the most reliable way to estimate spend based on traffic volume and geographic distribution. For validation, simple calculations using expected data transfer and request counts can provide a quick sanity check.&lt;br&gt;
Accurate estimates depend on understanding cache hit rates, request patterns, and whether optional features are enabled.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cdn</category>
      <category>cloudfront</category>
    </item>
  </channel>
</rss>
