AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured framework for deploying and managing AWS Transit Gateway, acting as a regional network hub. It streamlines the connection of multiple VPCs and on-premises networks, replacing complex point-to-point peering meshes with a centralized routing architecture. The skill covers the full lifecycle of transit gateway operations, including hub creation, traffic segmentation, centralized egress and inspection, hybrid connectivity, and inter-region peering.
What it does
- Creates and configures regional transit gateway hubs and VPC attachments.
- Implements traffic segmentation using custom route tables to isolate or share network environments.
- Centralizes egress and inspection traffic through dedicated VPCs using appliances or Gateway Load Balancer endpoints.
- Facilitates hybrid connectivity via Site-to-Site VPN and Direct Connect, including ECMP for bandwidth aggregation.
- Manages inter-region peering and migration from existing VPC peering meshes.
- Configures IP multicast routing across attached VPCs.
When to use it
- When you need to connect a large number of VPCs through a single, manageable router.
- When you require centralized inspection of traffic between VPCs or to the internet.
- When you need to isolate network environments while maintaining controlled access to shared services.
- When you are migrating from a complex, unmanageable VPC peering mesh.
- When you need to connect on-premises data centers to multiple VPCs efficiently.
Advantages
- Reduces network complexity by replacing point-to-point connections with a hub-and-spoke model.
- Enables consistent security enforcement through centralized inspection points.
- Supports scalable hybrid connectivity with options for performance optimization.
- Provides granular control over traffic flow via route table associations and propagations.
- Simplifies management of multi-region and multi-VPC network architectures.
Usage examples
- “How do I set up a transit gateway to connect three VPCs and ensure they are isolated from each other?”
- The agent will guide you through creating the transit gateway, attaching the VPCs, and configuring separate route tables to prevent cross-VPC communication.
- “I need to route all outbound traffic from my spoke VPCs through a central inspection VPC using a Gateway Load Balancer.”
- The agent will provide the steps to configure the central inspection VPC, set up the GWLB endpoint, and update route tables to force traffic through the inspection path.
- “Can you help me enable ECMP for my multiple VPN tunnels to increase bandwidth?”
- The agent will verify that you are using dynamic BGP routing and guide you through the configuration to aggregate bandwidth across your VPN tunnels.
- “We are moving off a VPC peering mesh. How do we migrate to a transit gateway without downtime?”
- The agent will outline a migration strategy, including creating the transit gateway, establishing attachments, and incrementally updating routes to transition traffic.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/aws/transitgateway/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip transitgateway.zip -d .agents/skills
Documentation by AWS
AWS Transit Gateway
Overview
Domain expertise for configuring AWS Transit Gateway, the Regional network hub that connects many VPCs and on-premises networks through a single router instead of a mesh of point-to-point connections. Covers building the hub and attaching VPCs, segmenting traffic with route tables, centralizing egress and inspection, east-west inspection with AWS Network Firewall, hybrid connectivity over Site-to-Site VPN and Direct Connect, inter-Region peering, migrating off a VPC peering mesh, and IP multicast.
This skill is a router. Each customer task maps to a procedure file under references/. Read the
matching reference in full before acting, then follow its constraints and steps. The reference
files are self-contained: each carries its own decision tables, constraints, procedure, and
troubleshooting.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. All CLI operations require least-privilege,
ephemeral credentials (an assumed IAM role through AWS STS or AWS IAM Identity Center / SSO), never
long-lived IAM user access keys. A transit gateway is a Regional resource: run each aws ec2
transit gateway command in the Region that holds the hub.
Which Transit Gateway task do you need?
| Goal | Reference |
|---|---|
| Create a Regional hub and connect VPCs to it | creating a transit gateway and attaching VPCs |
| Isolate some VPCs while letting others share services | segmenting traffic with route tables |
| Send all spoke traffic out through one inspected egress VPC | centralizing egress and inspection |
| Inspect traffic between VPCs with AWS Network Firewall | inspecting east-west traffic with Network Firewall |
| Reach on-premises networks over Site-to-Site VPN or Direct Connect | connecting on-premises networks |
| Link transit gateways in two Regions over the AWS network | peering transit gateways across Regions |
| Move off a VPC peering mesh without dropping traffic | migrating from VPC peering |
| Distribute IP multicast across attached VPCs | routing multicast traffic |
Routing notes
Decide segmentation before you build. "Default route table association" and "Default route table propagation" are on by default, which wires every attachment into one open mesh. If the customer plans isolated environments, the creating reference disables the defaults up front and hands off to the segmenting reference. Retrofitting isolation onto an open hub is a re-architect.
North-south egress vs east-west inspection. Centralizing egress sends spoke traffic out to the internet through a central VPC. East-west inspection keeps traffic between spokes internal and forces it through a firewall on the way. They look similar but use different route table recipes. Match the reference to the direction of traffic the customer actually has.
Appliance vs Gateway Load Balancer for inspection. Raw third-party appliances and a Gateway Load Balancer (GWLB) endpoint are two paths to the same goal. GWLB is the recommended approach for new designs. Both live in the centralizing-egress reference; appliance mode and the GWLB endpoint route table entries differ and the reference covers each.
Appliance mode is required for stateful cross-Availability-Zone inspection, with a tradeoff. Appliance mode keeps each flow on one Availability Zone's appliance so request and response do not split. It also disables cross-Availability-Zone failover for that attachment, so the inspection design must pair it with health-check-based failover. Both the egress and east-west references carry this.
Transit gateway side vs Direct Connect side. The connecting-on-premises reference covers the transit gateway side: Site-to-Site VPN attachment options, route propagation, and equal-cost multi-path (ECMP). The Direct Connect gateway and virtual interface setup belongs to the separate
directconnectskill. Do not restate the Direct Connect side here.
Security considerations
A transit gateway is the central routing point for many VPCs and on-premises networks, so a misconfiguration here has blast radius across every attached network. Apply these controls regardless of the specific task; each per-task reference carries the detail.
You MUST enable Transit Gateway Flow Logs for traffic visibility, audit, and incident response across the hub, and MUST enable encryption at rest on the destination (a KMS key on the CloudWatch log group, or SSE-KMS on the S3 bucket).
You MUST, when a KMS key encrypts a flow log destination (CloudWatch log group or S3 bucket) or a CloudTrail destination, scope the KMS key policy with condition keys (
aws:SourceArn,aws:SourceAccount, andkms:ViaService) so only the specific log group, bucket, or trail in the expected account and service can use the key, preventing cross-account or cross-service misuse.You SHOULD apply least-privilege IAM for transit gateway administration, avoiding service wildcards and FullAccess policies, restricting who can create attachments, modify route tables, and change associations or propagations.
You SHOULD ensure Site-to-Site VPN tunnels use strong encryption (for example AES-256-GCM with IKEv2) and enable tunnel logging to CloudWatch Logs with encryption enabled (a KMS key) to protect sensitive connection state and IKE negotiation detail from unauthorized access (see the connecting on-premises networks reference).
You MUST treat a misconfigured transit gateway route table as a security risk, since wrong associations or propagations can expose workloads across environments meant to stay isolated (see the segmenting traffic reference).
You MUST enable AWS CloudTrail to detect unauthorized changes to transit gateway route tables, associations, and propagations, MUST enable encryption at rest on the CloudTrail destination (a KMS key), and use AWS Config rules to detect drift from the intended design.
Additional Resources
Files
- ATTRIBUTION.mdAdded by AutoGineer939 B
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer67 B
- SKILL.md7.6 KiB
- references/centralizing-egress-and-inspection.md17.6 KiB
- references/connecting-on-premises-networks.md16.0 KiB
- references/creating-a-transit-gateway-and-attaching-vpcs.md14.1 KiB
- references/inspecting-east-west-traffic-with-network-firewall.md20.4 KiB
- references/migrating-from-vpc-peering.md11.7 KiB
- references/peering-transit-gateways-across-regions.md15.0 KiB
- references/routing-multicast-traffic.md11.8 KiB
- references/segmenting-traffic-with-route-tables.md12.7 KiB
references/segmenting-traffic-with-route-tables.md
Segmenting Traffic with Transit Gateway Route Tables
Overview
Domain expertise for controlling which attachments on a transit gateway can reach which, so some groups of VPCs talk to each other while others stay isolated (keeping production separate from development while both reach shared services). Covers the open default that defeats segmentation, the association-versus-propagation distinction that decides direction, the small number of route tables a real design needs, and the blackhole routes that keep isolation from leaking.
Does not cover creating the transit gateway or attaching VPCs (a separate reference), centralized egress, hybrid connectivity, peering, or multicast. Those are separate references.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging, observability). Fall back to the AWS CLI otherwise. A transit gateway is Regional; run every command in the Region that holds the hub.
Table of Contents
Overview
Workflow
Decision: association vs propagation
The open default defeats segmentation
How many route tables
Blackhole routes
Security considerations
Troubleshooting
Procedure
Additional Resources
Workflow
To segment traffic end to end, follow the procedure exactly. See the Procedure section below. It covers creating one route table per routing domain, associating each attachment with the table that defines what it can reach, propagating attachment routes only into the tables allowed to reach them, adding blackhole routes for ranges that must stay blocked, and surfacing the console link to verify.
Decision: association vs propagation
The two controls do different jobs and are easy to confuse.
| Control | What it sets |
|---|---|
| Association | Which route table an attachment uses for its own outbound lookups (where its traffic can go) |
| Propagation | Which route tables learn this attachment as a reachable destination (who can reach it) |
Constraints:
You MUST set association and propagation deliberately for each attachment, not leave them on the default
You MUST explain that association controls the outbound direction and propagation controls reachability, since wiring one when the other was meant either opens or blocks the wrong path
The open default defeats segmentation
With default association and propagation on, every attachment lands on one route table and can reach every other. The isolation the customer assumed is not there. Segmentation comes from association and propagation choices, not from creating the transit gateway.
Constraints:
You MUST confirm default route table association and propagation are off before building a segmented design
You MUST make the segmentation model explicit rather than rely on an open default
How many route tables
A workable segmented design uses a small number of route tables, such as one per environment plus a shared services table, not a separate transit gateway per environment and not a route table per VPC.
Constraints:
You SHOULD reach for route table segmentation before extra transit gateways
You SHOULD use a table per routing domain (for example: production, development, shared services), not one per VPC
Blackhole routes
Controlling association and propagation is not enough on its own. If a more specific route for a range exists in another table (for example propagated into a shared-services table), traffic to a range the customer meant to block can still find a path. A blackhole route drops traffic for a range explicitly.
Constraints:
You MUST add blackhole routes for the ranges the customer wants to deny, as part of the segmentation recipe
You MUST NOT rely on the mere absence of a route for isolation, since another table's propagation can add one
Security considerations
Segmentation is itself a security control, so a misconfiguration silently weakens isolation rather than failing loudly. Propagating an attachment into the wrong table leaks routes between environments the customer meant to keep separate, and the gap is invisible until traffic crosses a boundary.
Constraints:
You MUST treat a misconfigured propagation as a security risk, since it can leak routes between isolated environments without any error
You SHOULD recommend regular route table audits (review associations, propagations, and routes against the intended segmentation model)
You SHOULD recommend enabling AWS CloudTrail to detect unauthorized
associate-transit-gateway-route-tableandenable-transit-gateway-route-table-propagationcallsYou SHOULD recommend AWS Config rules to detect drift from the intended segmentation model
Troubleshooting
Everything reaches everything despite separate tables
Default association and propagation are still on, or attachments are still on the default table. Move each attachment to its domain's table and turn the defaults off.
A path is open that should be closed
Propagation is enabled into a table that should not learn that attachment, or a blackhole route is missing. Remove the propagation or add a blackhole route for the range.
A path is closed that should be open
The attachment is associated with the wrong table, or the destination is not propagated into the source's table. Fix the association or enable propagation.
Traffic leaks to a blocked range
A more specific route exists in another table. Add an explicit blackhole route for the range.
Procedure
Overview
This procedure creates the route tables, associates each attachment with its domain's table, propagates destinations only where allowed, adds blackhole routes for blocked ranges, and surfaces the console link to verify.
Parameters
region (required): The Region that holds the transit gateway.
transit_gateway_id (required): The transit gateway to segment.
domains (required): The routing domains and which attachments belong to each (for example production, development, shared services).
blocked_ranges (optional): Ranges that must be denied even if a route exists elsewhere.
Constraints for parameter acquisition:
You MUST ask for all required parameters upfront in a single prompt
You MUST confirm default route table association and propagation are off
Steps
1. Verify dependencies
Constraints:
You MUST confirm credentials with
aws sts get-caller-identity, and you MUST use short-lived, ephemeral credentials scoped to least privilege for transit gateway administration, never long-lived access keys or broad service wildcard or FullAccess policiesYou MUST confirm default route table association and propagation are off before building a segmented design
You MUST enable VPC Flow Logs on the attached VPC subnets and Transit Gateway Flow Logs on the hub for traffic visibility, audit, and incident response across every attached network. These logs carry sensitive traffic data, so you MUST enable encryption at rest on the destination (a KMS key on the CloudWatch log group, or SSE-KMS on the S3 bucket)
You SHOULD enable AWS CloudTrail to record transit gateway attachment, route table, association, and propagation changes for audit and unauthorized-change detection, and you MUST enable encryption at rest on the CloudTrail destination (a KMS key)
You MUST, when a KMS key encrypts a flow log destination (CloudWatch log group or S3 bucket) or the CloudTrail destination, scope the KMS key policy with condition keys (
aws:SourceArn,aws:SourceAccount, andkms:ViaService) so only the specific log group, bucket, or trail in the expected account and service can use the key, preventing cross-account or cross-service misuseYou SHOULD create CloudWatch alarms for transit gateway attachment creation and deletion, route table changes, and failed or blocked attachment states, so that unexpected or unauthorized changes and failure conditions are surfaced for investigation rather than discovered after impact
2. Create a route table per domain
Constraints:
You MUST create one transit gateway route table per routing domain:
aws ec2 create-transit-gateway-route-table \ --transit-gateway-id {transit_gateway_id} --region {region}You MUST capture each
TransitGatewayRouteTableIdYou MUST poll until each route table reaches
available:aws ec2 describe-transit-gateway-route-tables \ --transit-gateway-route-table-ids {route_table_id} --region {region}
3. Associate each attachment with its domain's table
Constraints:
You MUST first disassociate the attachment from any existing route table if it is already associated (an attachment can only be associated with one route table at a time):
aws ec2 disassociate-transit-gateway-route-table \ --transit-gateway-route-table-id {old_route_table_id} \ --transit-gateway-attachment-id {attachment_id} --region {region}You MUST associate each attachment with the route table that defines what it can reach:
aws ec2 associate-transit-gateway-route-table \ --transit-gateway-route-table-id {route_table_id} \ --transit-gateway-attachment-id {attachment_id} --region {region}You MUST poll until the association reaches
associated:aws ec2 get-transit-gateway-route-table-associations \ --transit-gateway-route-table-id {route_table_id} --region {region}
4. Propagate destinations only where allowed
Constraints:
You MUST enable propagation of an attachment into a route table only when that domain is allowed to reach the attachment:
aws ec2 enable-transit-gateway-route-table-propagation \ --transit-gateway-route-table-id {route_table_id} \ --transit-gateway-attachment-id {attachment_id} --region {region}You MUST NOT propagate an attachment into a table whose domain should not reach it
5. Add blackhole routes for blocked ranges
Constraints:
You MUST add a blackhole route for each range that must stay blocked:
aws ec2 create-transit-gateway-route \ --transit-gateway-route-table-id {route_table_id} \ --destination-cidr-block {blocked_range} --blackhole --region {region}
6. Confirm and surface the console link
Constraints:
You MUST review the routes in each table to confirm the intended reachability:
aws ec2 search-transit-gateway-routes \ --transit-gateway-route-table-id {route_table_id} \ --filters Name=state,Values=active,blackhole --region {region}You MUST present the transit gateway console link, filling
{transit_gateway_id}and{region}from the API response, and tell the customer to open it and review the route tables:https://{region}.console.aws.amazon.com/vpc/home?region={region}#TransitGatewayRouteTables:
Example
Example input
{
"region": "us-east-1",
"transit_gateway_id": "tgw-0abc",
"domains": {
"domain-alpha": ["tgw-attach-alpha"],
"domain-beta": ["tgw-attach-beta"],
"shared": ["tgw-attach-shared"]
},
"blocked_ranges": ["10.20.0.0/16"]
}Example output
Created three route tables: domain-alpha, domain-beta, shared.
Associated each attachment with its domain's table.
Propagated shared into domain-alpha and domain-beta (both reach shared services); did not propagate
domain-alpha and domain-beta into each other (kept isolated).
Added a blackhole route for 10.20.0.0/16 in the domain-alpha and domain-beta tables.
Open the transit gateway route tables and review reachability:
https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#TransitGatewayRouteTables:Troubleshooting
Two isolated domains can still reach each other
They are propagated into each other's tables, or still on the default table. Remove the propagation and confirm each is on its own domain table (Steps 3 and 4).
Traffic reaches a range that should be blocked
A more specific route exists elsewhere. Add a blackhole route for the range (Step 5).
A domain cannot reach shared services
Shared is not propagated into that domain's table. Enable propagation of the shared attachment (Step 4).
Additional Resources
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- AWS
- Publisher
- AWS (Official)
- Source
- aws/agent-toolkit-for-aws · skills/specialized-skills/networking-and-content-delivery-skills/transitgateway · commit 0a218f8
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- NOTICE (added by AutoGineer from NOTICE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by AWS or AWS.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download transitgateway.zip