Join our Newsletter — 33% off our NHI Course
Home› Guides› AWS Transit Gateway Security Guide: Route Tables, Segmentation,…
Guide Cloud Security

AWS Transit Gateway Security Guide: Route Tables, Segmentation, Inspection and Logging

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 17 min read
On this page

An AWS Transit Gateway left on its default settings joins every attached VPC and on-premises network into one routing domain, so a single compromised workload can reach everything the hub can reach. A transit gateway (TGW) is the regional hub that connects VPCs, Site-to-Site VPN, Direct Connect gateways and peered transit gateways. Its security depends almost entirely on route table design: which attachments are associated with which table, which routes propagate where, and where traffic is forced through inspection. This guide covers segmentation with route tables, centralised inspection and appliance mode, attachment and sharing controls, IAM for the network account, and logging with Transit Gateway Flow Logs. It is written for cloud network engineers and security architects running multi-account AWS estates, and it assumes you already know VPC basics from the Amazon VPC Security Guide.

Key takeaways

  • Turn off default association and propagation. Both are enabled by default on a new transit gateway, which places every new attachment into one shared, fully meshed route table.
  • Segment with route tables, not hope. Each attachment is associated with exactly one route table; build one table per security zone and control reachability through what propagates into it.
  • Enable appliance mode on the inspection VPC attachment. Without it, return traffic can cross to a different Availability Zone and a stateful firewall drops the flow.
  • Keep shared attachment acceptance manual. Auto accept shared attachments is disabled by default; leave it off so the network account reviews every cross-account attachment.
  • Log flows and changes together. Transit Gateway Flow Logs show traffic and drops per attachment, while CloudTrail records route and attachment changes; you need both to detect a segmentation bypass.

How Transit Gateway routing decides reachability

Three concepts control every packet that crosses a transit gateway. AWS documents that an attachment can be associated with a single route table, that each route table can be associated with zero to many attachments, and that an attachment can propagate its routes to one or more route tables. Association decides which table is consulted for traffic arriving from an attachment. Propagation decides which tables learn a route back to that attachment. Static routes, including blackhole routes that drop matching traffic, override or supplement what propagation installs.

  • Association: the source side. A spoke VPC attachment associated with the "production" table can only reach destinations present in that table.
  • Propagation: the destination side. If the development VPC attachment does not propagate into the production table, production has no route to development, and the reverse holds too.
  • Static and blackhole routes: explicit entries. A static route takes priority over a propagated route with the same destination, and a blackhole route drops traffic for a CIDR even when a broader route exists.
  • Prefix list references: a managed prefix list can be referenced in a route table so a set of CIDRs is maintained in one place.

Route selection follows the most specific route for the destination. For routes with the same CIDR from different sources, AWS gives this order: static routes, system routes installed for 1:1 NAT, prefix list referenced routes, VPC propagated routes, Direct Connect gateway propagated routes, Transit Gateway Connect propagated routes, VPN over private Direct Connect, Site-to-Site VPN, VPN Concentrator, Client VPN, then peering propagated routes. The security consequence is that a more specific prefix advertised over BGP from on premises can win over a broad static route to your firewall. Filter what your customer gateways advertise, and test route tables after every change.

Transit gateway options and their security relevance

The defaults below are those stated in the AWS CLI reference for create-transit-gateway, checked November 2026.

OptionDefaultSecurity effectRecommended setting
DefaultRouteTableAssociationEnabledNew attachments land in the default table automaticallyDisable; associate explicitly per zone
DefaultRouteTablePropagationEnabledNew attachments advertise their CIDRs into the default table, creating any to any reachabilityDisable; propagate explicitly
AutoAcceptSharedAttachmentsDisabledCross-account attachments wait in pending acceptanceKeep disabled, or accept through a reviewed pipeline
SecurityGroupReferencingSupportDisabledAllows inbound rules that reference security groups in other attached VPCsEnable only where needed and understood (see below)
DnsSupportEnabledResolves public DNS host names to private IPv4 addresses across attached VPCsUsually keep; plan private hosted zones separately
VpnEcmpSupportEnabledEqual cost multipath across VPN tunnelsKeep for resilience; ensure inspection handles asymmetric paths
AmazonSideAsn64512BGP identity of the gatewayUse a unique private ASN per transit gateway

Changing association and propagation defaults on an existing gateway does not move attachments that are already associated. Inventory the current default table first, then migrate attachments one at a time.

Segmentation patterns with route tables

AWS recommends limiting the number of transit gateway route tables unless your design needs more, so pick the smallest set of zones that matches real trust boundaries. The AWS multi-VPC whitepaper describes zones such as untrusted, production, development and security, separated with multiple route tables and blackhole routes. The table compares the common patterns.

PatternHow it worksGood forWatch out for
Flat (single default table)All attachments associate and propagate into one tableLabs and very small estates onlyAny compromised VPC reaches every other VPC and on premises
Isolated spokes with shared servicesSpokes associate with a spoke table that holds only shared services and on-premises routes; shared services table receives all spoke propagationsMost organisations: spokes cannot talk to each otherShared services VPC becomes a pivot point; harden it as a high value zone
Environment zonesSeparate tables for production, non-production and shared; propagation only within a zone plus to shared servicesSeparating prod from dev without inspecting all trafficExceptions creep in as static routes; review them quarterly
Centralised inspectionSpoke tables hold a static default route to an inspection VPC; the inspection table receives spoke propagationsRegulated estates and east west inspection requirementsCost and latency; needs appliance mode and careful return routing
Inspection for selected flowsSpecific prefixes routed via inspection, the rest via direct zone routingBalancing cost against coverage, as the AWS whitepaper suggestsMore specific routes can bypass the firewall if propagation is not controlled

Wider principles for zones and trust boundaries are in the Network Segmentation Guide. Transit Gateway segmentation is coarse, at VPC and CIDR level: combine it with security groups inside each VPC for workload level control.

Security group referencing across the hub

Security group referencing lets an inbound rule in one VPC reference a security group in another VPC attached to the same transit gateway. AWS documents several limits that matter for security design: it works for inbound rules only, it must be enabled on both the transit gateway and the VPC attachment, it does not work across transit gateway peering, and it does not work across a Gateway Load Balancer or AWS Network Firewall in an inspection VPC. If you inspect traffic centrally, write CIDR based rules for flows that cross the inspection path, and do not assume a referenced group is being enforced end to end.

Centralised inspection and appliance mode

The standard inspection design puts firewalls in a dedicated inspection VPC attached to the transit gateway. Spoke attachments associate with a table whose default route (or internal supernet route) points statically at the inspection attachment. The inspection attachment associates with a table that receives propagated routes from every spoke, so inspected traffic can be returned to its destination.

Inside the inspection VPC, AWS's example uses separate subnet route tables: the transit gateway attachment subnet sends all traffic to the firewall endpoint or appliance in the same Availability Zone, and the firewall subnet sends traffic back to the transit gateway. The AWS whitepaper adds that firewall subnets should contain only AWS Network Firewall endpoints, because Network Firewall cannot inspect traffic in the same subnet as its endpoints.

  • Appliance mode: when enabled on the inspection VPC attachment, the transit gateway selects one network interface in the appliance VPC using a flow hash and uses the same interface for return traffic, so both directions pass through the same Availability Zone. Without it, AWS shows how response traffic reaches an appliance in a different zone that has no state for the flow, and the traffic is dropped. Enable it with ApplianceModeSupport=enable on the attachment.
  • One gateway per appliance VPC: AWS states that flow stickiness is guaranteed only when exactly one transit gateway connects to the appliance VPC, because separate gateways do not share flow state.
  • Transit gateway attached firewalls: AWS Network Firewall can attach directly to a transit gateway, including a gateway shared through AWS Resource Access Manager, without provisioning multiple firewall endpoints or the networking configuration a standard firewall setup needs. The transit gateway owner and the firewall owner can be the same account or different accounts.
  • Gateway Load Balancer: the alternative for third party appliances. Its endpoints sit in the inspection VPC with the same routing principles.

Firewall rule design itself is covered in the AWS Network Firewall guide, and central rule distribution in the AWS Firewall Manager Guide. For outbound control from spokes, see Cloud Egress Filtering.

Choosing an inspection approach

ApproachChoose whenTrade off
Inspection VPC with AWS Network Firewall endpointsYou want managed stateful inspection and full control of VPC routingYou maintain the inspection VPC subnets and route tables per Availability Zone
Transit gateway attached Network FirewallYou want fewer moving parts and central ownership in a network or security accountLess routing flexibility inside a VPC you own; confirm current considerations in AWS docs
Gateway Load Balancer with third party appliancesExisting firewall vendor policy, features or skills must carry over to AWSAppliance licensing, patching and scaling are yours
No central inspection, zone routing onlySmall estate, low east west risk, strong security groupsLateral movement inside a zone is limited only by security groups

Attachments, sharing and the network account

In a multi-account estate, the transit gateway usually lives in a central network account and is shared to workload accounts with AWS Resource Access Manager (RAM). Workload accounts create VPC attachments; the network account controls route tables. That split is the core security boundary, so protect it.

  1. Share narrowly: share the transit gateway with the organisational units that need it rather than the whole organisation, and review the resource share when OUs change. See the AWS Multi-Account Security Reference Architecture Guide.
  2. Accept attachments deliberately: with auto accept disabled, a cross-account attachment enters the pending acceptance state. Accept through a change request or pipeline that checks the VPC CIDR, owning account and target zone before association.
  3. Associate before propagating: associate the new attachment to its zone table, confirm the routes, then enable propagation to the tables that should reach it.
  4. Dedicated attachment subnets: AWS recommends a separate small subnet (for example a /28) per Availability Zone for each attachment, with open network ACLs on those subnets and filtering applied on workload subnets instead. One subnet per Availability Zone is required, and only Availability Zones with an attachment subnet can reach the gateway.
  5. 1:1 NAT stays with the owner: AWS documents that only the transit gateway owner can view or modify the 1:1 NAT configuration of any attachment, including attachments owned by other accounts, and that this cannot be delegated.

Where identity fits

Transit Gateway has no data plane authentication: once a route exists, packets flow. The control is who can change routes and attachments. Treat the network account's roles as privileged, and remember that much of the change comes from pipelines and automation roles rather than people, which makes them non-human identities with very high blast radius.

  • Least privilege on route actions: AWS's example IAM policy lets users create and replace routes only for attachments with a specific resource tag, using the ec2:ResourceTag condition key, and requires a tag on new gateways with aws:RequestTag. Apply the same pattern so a workload team's role cannot touch another zone's table.
  • Guardrails above IAM: use service control policies to deny ec2:CreateTransitGatewayRoute, ec2:ReplaceTransitGatewayRoute, ec2:EnableTransitGatewayRouteTablePropagation and attachment acceptance outside the network account. See the AWS Organizations and SCPs Guide.
  • Describe is not everything: AWS notes that policies granting ec2:Describe* do not include ec2:GetTransitGatewayAttachmentNatConfiguration, so read only audit roles need that action added explicitly.
  • Pipeline roles: infrastructure as code roles that manage the gateway should be federated, short lived and scoped to the network account. See the Workload Identity Federation Guide.

Logging, detection and measurement

Transit Gateway Flow Logs capture IP traffic through the gateway and can be delivered to Amazon CloudWatch Logs, Amazon S3 or Amazon Data Firehose. They add fields that VPC Flow Logs do not have, which makes them the best single view of cross-VPC traffic.

Field or sourceWhat it tells youUse it to detect
tgw-attachment-id, tgw-pair-attachment-idIngress and egress attachment for the flowTraffic between zones that should never talk
tgw-src-vpc-account-id, tgw-dst-vpc-account-idSource and destination accountsCross-account flows outside the approved matrix
packets-lost-blackholePackets dropped by blackhole routesProbing of isolated ranges, misrouted applications
packets-lost-no-routePackets with no matching routeScanning (T1046 Network Service Discovery) or broken change
flow-direction, tgw-src-az-id, tgw-dst-az-idDirection and Availability ZoneAsymmetric paths around inspection
CloudTrail EC2 eventsRoute, propagation, association and attachment API callsUnauthorised route changes or new attachments

Flow logs are not real time: AWS states collection can take several minutes to start, multicast traffic is not supported, and Connect attachment flows appear under the transport attachment. Keep flow logs in a log archive account, and alert on CloudTrail events such as CreateTransitGatewayRoute, ReplaceTransitGatewayRoute, DeleteTransitGatewayRoute, EnableTransitGatewayRouteTablePropagation, AssociateTransitGatewayRouteTable, AcceptTransitGatewayVpcAttachment and ModifyTransitGatewayVpcAttachment (which can change appliance mode). See the AWS CloudTrail Guide and the AWS VPC Flow Logs Detection Guide.

Metrics that show the design is working:

  • Default table usage: number of attachments associated with or propagating into the default route table (target zero).
  • Unreviewed route changes: transit gateway route or propagation changes without a linked change record per month (target zero).
  • Inspection coverage: percentage of inter-zone flows in flow logs whose path includes the inspection attachment.
  • Forbidden flows: count of flows between zone pairs that the segmentation matrix forbids.
  • Static route exceptions: number of static exception routes older than their review date.
  • Logging coverage: percentage of transit gateways in all Regions with flow logs enabled.

Implementation and rollback

  1. Inventory (week 1): list every transit gateway in every Region, its options, route tables, associations, propagations, static routes and attachments with owning accounts. Enable flow logs everywhere first so you have a baseline.
  2. Define the matrix (weeks 1 to 2): write the zone to zone reachability matrix and map each attachment to a zone. Use flow log data to find real dependencies before you block them.
  3. Build new tables alongside (week 3): create zone route tables and propagations without moving attachments. Disable default association and propagation on the gateway so new attachments stop joining the flat table.
  4. Pilot one spoke (week 4): re-associate a low risk non-production attachment to its zone table, test application paths and check packets-lost-no-route for unexpected drops. Rollback is re-associating the attachment with the previous table, so record the original table ID before every move.
  5. Insert inspection (weeks 5 to 8): enable appliance mode on the inspection attachment before routing traffic to it, then add the static default route on one spoke table at a time. Run the firewall in alert mode first where the product supports it.
  6. Migrate in rings: move remaining spokes by zone, production last, with a maintenance window and a named rollback owner.
  7. Lock down (ongoing): apply SCPs, tag based IAM and CloudTrail alerts, and test segmentation regularly. See the Network Segmentation Testing Guide and the Reachability Analysis Guide.

Small vs large estates: with fewer than a handful of VPCs, isolated spokes plus security groups and egress filtering may be enough, and a full inspection VPC can cost more than it protects. Large and regulated estates should run a central network account, zone tables, inspection for inter-zone and on-premises traffic, and a single transit gateway per Region, which AWS states is highly available by design, so extra gateways for availability are not needed.

Common failure patterns

  • Leaving the defaults on: default association and propagation quietly mesh every new VPC, including a vendor or sandbox VPC, with production and on premises.
  • Inspection without appliance mode: intermittent drops of long lived connections lead teams to add bypass routes "temporarily", which become permanent.
  • More specific routes around the firewall: a spoke propagating its CIDR into another spoke's table, or an on-premises BGP advertisement, wins over the static default route to inspection.
  • Trusting security group references through inspection: AWS states referencing does not work across Gateway Load Balancer or Network Firewall, so rules that look strict may not match as intended.
  • Hybrid bridge treated as trusted: VPN and Direct Connect attachments associated with a table that reaches every VPC give an on-premises compromise a direct path into the cloud. The Hybrid Cloud Security guide covers that trust link; for circuits see the Dedicated Cloud Connectivity Security Guide and the Site-to-Site VPN Security Guide.
  • Broad network roles: managed policies such as AmazonEC2FullAccess on workload roles allow route and attachment changes the network team never sees.

Framework mapping

Control areaNIST CSF 2.0NIST SP 800-53 Rev 5CIS Controls v8.1ISO/IEC 27001:2022 Annex A
Zone route tables and blackholesPR.IR-01SC-7, SC-7(5), AC-412.2A.8.20, A.8.22
Central inspectionPR.IR-01, DE.CM-01SC-7, SI-413.4A.8.20
Flow logs and CloudTrailPR.PS-04, DE.CM-01AU-12, SI-413.6A.8.15, A.8.16
Change control on routes and attachmentsPR.IR-01CM-2, CM-312.2A.8.32

On the threat side, unauthorised route or attachment changes relate to ATT&CK T1599 Network Boundary Bridging, and the reconnaissance that segmentation limits relates to T1580 Cloud Infrastructure Discovery and T1046 Network Service Discovery.

Practitioner checklist

  • Disable default route table association and propagation on every transit gateway, and move attachments off the default table.
  • Document a zone reachability matrix and build one route table per zone, with blackhole routes for ranges that must stay isolated.
  • Enable appliance mode on every inspection VPC attachment and connect only one transit gateway to each appliance VPC.
  • Keep auto accept shared attachments disabled and accept cross-account attachments through a reviewed process.
  • Share the transit gateway through AWS RAM only with the OUs that need it.
  • Restrict route, propagation and attachment actions to the network account with SCPs and tag conditioned IAM.
  • Filter BGP advertisements from on premises so more specific prefixes cannot bypass inspection.
  • Enable Transit Gateway Flow Logs in every Region and alert on blackhole and no route drops between zones.
  • Alert on CloudTrail transit gateway route, association, propagation and attachment changes.
  • Test segmentation after every change and at least quarterly, recording the results as evidence.

Standards and references

Related NHI Mgmt Group resources: Amazon VPC Security Guide · AWS Network Firewall · Network Segmentation Guide · AWS Multi-Account Security Reference Architecture Guide · Hybrid Cloud Security

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.