Transitgateway

From aws/agent-toolkit-for-aws · View interactive version

Transitgateway is an AI agent skill from the GitHub repository aws/agent-toolkit-for-aws. Configures AWS Transit Gateway: creating a hub and attaching VPCs, segmenting traffic with route tables, centralizing egress and inspection through a hub (appliances or a Gateway Load Balancer endpoint), forcing east-west traffic between VPCs through AWS Network Firewall, connecting on-premises netw

How to use this skill

Skill file

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

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.

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.

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.

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: 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

directconnect skill. 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.

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).

CloudTrail destination, scope the KMS key policy with condition keys (aws:SourceArn,

aws:SourceAccount, and kms: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.

wildcards and FullAccess policies, restricting who can create attachments, modify route tables,

and change associations or propagations.

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).

associations or propagations can expose workloads across environments meant to stay isolated (see

the segmenting traffic reference).

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.