Networking & Content Delivery
Introducing Flexible Cost Allocation for AWS Transit Gateway
Today AWS announced Flexible Cost Allocation (FCA) for AWS Transit Gateway, a capability that gives you granular control over how Transit Gateway data processing costs are allocated across AWS accounts, including member accounts within AWS Organizations. With FCA, you configure metering policies for your Transit Gateway that allows you the flexibility to allocate charges to the source attachment owner, destination attachment owner, or Transit Gateway owner based on rules you define.
In this post, we review why we need Flexible Cost Allocation for Transit Gateway, characteristics of FCA, some key use cases, and how you can leverage FCA to align charges to the appropriate AWS accounts in your environment.
How flexible cost allocation works
Transit Gateway’s default sender-pay model doesn’t always align with organizational budgets and chargeback policies. Common challenges include central IT teams managing Direct Connect ingress see charges accumulate in their infrastructure accounts even though business unit VPCs consume that data, security teams providing centralized inspection services bear costs for traffic traversing their VPC attachments, and service providers connecting to customer-owned Transit Gateways incur charges for infrastructure they don’t control.
Previously, organizations used workarounds like manually reallocating charges based on Transit Gateway Flow Logs and AWS Data Exports or percentage-based approximations, while others absorbed costs as overhead. These approaches worked, but weren’t ideal and in some organizations even led to architectural decisions to implement more complex VPC peering topologies to avoid the cost allocation complications.
FCA enables automatic allocation of all Transit Gateway data processing charges, including Transit Gateway processing, AWS Site-to-Site VPN Data Transfer Out, AWS Direct Connect Data Transfer Out and Data Transfer peering charges. Once configured, metering rules automatically handle charge allocation according to your policy. FCA operates through a metering policy configured directly on your Transit Gateway. The policy evaluates each data flow against a set of rules in ascending numerical order, stopping at the first match to determine which account receives the charge. This first-match evaluation model provides precise control: assign low rule numbers for specific exceptions, higher numbers for broader policies, and use a default rule to catch all remaining traffic.
FCA provides three policy control levels:
- Transit Gateway-level: Set default allocation for all traffic
- Attachment-level: Define rules by attachment type (VPC, Direct Connect Gateways, VPN, TGW peering, TGW network function, or TGW VPN Concentrator attachments) or specific attachment IDs
- Flow-level: Match individual flows using 5-tuple attributes (source/destination IP CIDRs, port ranges, protocols)
This multi-level approach lets you implement receiver-pay models to address use cases such as Direct Connect ingress, routes security inspection charges to application teams, allocates partner connection costs to Transit Gateway owners, and applies sender-pay defaults for internal communication, all from a single policy.
For each traffic flow, you allocate costs to one of three account owners:
- Source attachment account owner – Traditional sender-pays model
- Destination attachment account owner – Receiver pays for incoming data
- Transit Gateway account owner – Central infrastructure team absorbs costs
FCA incurs no additional charges and doesn’t impact traffic flow. You gain precise cost attribution without custom tooling, log analysis infrastructure, or manual calculations.
Use cases
Direct Connect ingress chargeback
In hybrid cloud architectures, enterprise organizations route data from on-premises data centers to AWS through Direct Connect and Transit Gateway services, resources that are typically owned and managed by central IT teams, while application teams (e.g. marketing, finance) own the destination VPC workloads that receive the data. Flexible Cost Allocation (FCA) enables receiver-pay models by automatically allocating Transit Gateway data processing charges to the VPC owners who consume the data: when traffic flows to the marketing team’s VPC, marketing pays; when it flows to finance, finance pays, thereby eliminating manual calculations while aligning costs with actual usage patterns. This consumption-based model enables central IT to focus budgets on infrastructure availability while application teams account for their workload-generated networking costs, providing complete visibility into cloud Total Cost of Ownership (TCO) and delivering the cost transparency essential for hybrid cloud economics at scale.
Centralized security inspection with transparent cost attribution
For organizations implementing Transit Gateway (hub-and-spoke) centralized traffic inspection architectures with AWS Network Firewall or third-party security appliances via Gateway Load Balancer (GWLB), FCA provides purpose-built support for inspection scenarios. By designating specific Transit Gateway attachment IDs as middlebox attachments, FCA intelligently allocates cost to the actual source or destination owners rather than the intermediate inspection attachment, making the inspection layer transparent to cost allocation. This enables security teams to provide centralized threat detection and policy enforcement as true shared infrastructure while costs are attributed to application teams based on your chargeback policies, whether sender-pay, receiver-pay, or Transit Gateway account owner. Application teams gain complete visibility into the networking costs their traffic generates, including security controls, allowing organizations to meet mandatory inspection requirements while maintaining budget accountability aligned with technical architecture.
Partner and service provider connectivity
Enterprise customers and Independent Software Vendors (ISVs) delivering services by integrating their AWS VPCs with partner or client-owned Transit Gateways traditionally incur all data processing charges on those client-owned TGW attachments, despite not owning the infrastructure. FCA resolves this by enabling clients to configure metering policies on their Transit Gateways that allocate provider attachment costs to their own Transit Gateway owner account, establishing transparent cost attribution from the outset. Service providers benefit from predictable pricing models focused on application value, independent of client Transit Gateway charges, while clients gain complete visibility into their infrastructure costs for accurate TCO calculations. By including FCA configuration guidance in integration documentation, providers eliminate cost unpredictability associated with client-controlled infrastructure and establish clear financial boundaries that scale across dozens or hundreds of partner and client environments.
Scenario Setup
FCA metering policies support multiple cost allocation models simultaneously through rule-based evaluation. Consider a centralized architecture using AWS Transit Gateway as network hub handling partner connections, Direct Connect ingress, and east-west (VPC-to-VPC) traffic.
Figure1: Centralized architecture using AWS Transit Gateway as network hub handling partner connections, Direct Connect ingress, and east-west (VPC-to-VPC) traffic.
You may start with an FCA metering policy like this:
- Rule 100 to set the destination attachment owner as the metered account for attachment type Direct Connect Gateway (allocating Transit Gateway data processing charges to destination VPC owners like VPC-Finance)
- Rule 200 to set the Transit Gateway owner account as the metered account for the attachment id of the partner VPC (allocating Transit Gateway data processing charges to the Transit Gateway owner account for traffic from the partner VPC)
- and the default rule for all other traffic to use the standard sender-pay policy (charging source attachment owners like VPC-Marketing)
Now if the partner VPC starts communicating with resources in our on-premises network and we decide to add VPC-Middlebox for traffic routing between VPC-Marketing and VPC-Finance we may want to update our metering policy.
- Rule 90 to set Transit Gateway owner account as the metered account for attachment type Direct Connect Gateway and Destination attachment id of VPC-Partner-A (Matching before rule 100 allocating Transit Gateway data processing charges to the Transit Gateway owner account)
- Note that the Transit Gateway owner account would already be the metered account for the Direct Connect DTO based on rule 200, so no update was required for the VPC-Partner-A to on-premises side of the flow.
- Add VPC-Middlebox attachment as a Middlebox attachment (allocating charges routing through VPC-Middlebox to the original source or destination based on the rules, which would be the default rule of source attachment owner in our example)
Each flow is evaluated once against the policy rules in priority order, matched to the first applicable rule, and charges are automatically routed to the specified metered account owner. This rule-based approach enables organizations to implement nuanced cost allocation strategies that reflect different business relationships and consumption pattern, all handled natively by AWS without manual intervention or custom tooling.
Getting Started
Implementing FCA involves three steps using the AWS CLI, SDK, or Management Console:
Step 1: Create Your Metering Policy
In the AWS Management Console Navigate to VPC – Metering policies and select Create metering policy
Give your metering policy a name, select your Transit Gateway from the drop down and click Create transit gateway metering policy.
Step 2: Add Metering Policy Entries
Select the radio button beside your metering policy and click Create metering policy entry
Allocate Direct Connect ingress charges to destination VPC owners:
Type 100 in the Policy rule number box, select Destination Attachment Owner from the Metered account drop down, select Direct Connect Gateway from the Source attachment type or ID drop down, and click Create metering policy entry
Repeat the process to assign the VPC-Partner-A attachment ID metering account to Transit Gateway owner account.
Type 200 in the Policy rule number box, select Transit Gateway Owner from the Metered account drop down, select the Transit Gateway attachment ID for VPC-Partner-A from the Source attachment type or ID drop down, and click Create metering policy entry
Repeat the process to assign the Direct Connect Gateway to VPC-Partner-A metering account to Transit Gateway owner account.
Type 90 in the Policy rule number box, select Transit Gateway Owner from the Metered account drop down, select Direct Connect Gateway from the Source attachment type or ID drop down, select the Transit Gateway attachment id for VPC-Partner-A from the Destination attachment type or ID drop down, and click Create metering policy entry
Step 3: Configure Middlebox Support
Click the Middlebox attachments tab then select Add
On the Add middlebox attachments pop-up select the VPC-Middlebox attachment from the drop down and click Add middlebox attachments
This instructs FCA to route charges around inspection attachments to the original source or destination based on your policy rules.
Best Practices
- Start broad, then add specificity: Begin with attachment type-based rules numbering then add specific attachment ID rules for exceptions
- Number rules with gaps: Increment initial rule numbers by 100s (100, 200, 300) to easily insert new rules later without renumbering your entire policy.
- Test in non-production first: Validate your metering policy logic in development environments before applying to production
- Document your policy logic: Record the business logic behind each rule for future administrators
- Monitor cost allocation changes: Use AWS Cost Explorer to verify charges route as expected (typically within 24 hours)
Conclusion
Flexible Cost Allocation is available today in all AWS commercial regions where Transit Gateway operates at no additional charge. You pay only for your existing Transit Gateway data processing rates with charges allocated according to your configured policies.
Visit the AWS Transit Gateway Flexible Cost Allocation documentation for complete API reference, additional configuration examples including 5-tuple flow matching, and detailed implementation guidance. Learn more about Transit Gateway architecture patterns in the documentation, and join the conversation in the AWS Networking & Content Delivery Community.



