top of page

AWS Transit Gateway Configuration Demo

Why AWS Transit Gateway? AWS Transit Gateway is used to simplify network connectivity and management by acting as a centralized hub for connecting multiple VPCs and on-premises networks.


Alternative Solution?

VPC Peering, but in case of multiple VPCs, it can be a little messy.


In this use case we are playing between two regions N.Virginia (us-east-1) and Oregon (us-west-2), and two AWS accounts 'Account A' and 'Account B'.


In this case we need to establish connectivity between EC2 instances EC2-1, EC2-2 and EC2-3.


Before starting let me clarify that Transit Gateway can be shared and used between multiple accounts but not between multiple regions.


  1. Create Transit Gateway tgw-a-virginia in Account A region Virginia.

  2. Create Transit Gateway tgw-a-oregon in Account A region Oregon.

  3. Share Transit Gateway tgw-a-virginia with Account B region Virginia usign AWS RAM.

  4. Accept this sharing, entering into AWS RAM of Account B

  5. Create Transit Gateway Attachment (tgwa-tgw-a-virginia-a-virginia-vpc) of type VPC between transit gateway tgw-a-virginia and VPC a-virginia-vpc.

  6. Create Transit Gateway Attachment (tgwa-tgw-a-oregon-a-oregon-vpc) of type VPC between transit gateway tgw-a-oregon and VPC a-oregon-vpc.

  7. Create Transit Gateway Attachment (tgwa-tgw-a-virginia-b-virginia-vpc) of type VPC between transit gateway tgw-a-virginia and VPC b-virginia-vpc.

  8. Add routes to the route tables of subnets in each VPC as mentioned in the image above.

After this configuration of Transit Gateways we can successfully establish connections between EC2 instances EC2-1, EC2-2 y EC2-3.

To test the connectivity we can use telnet commands in each if the EC2 instaces... From EC2-1: telnet 10.2.2.20 22

telnet 10.3.3.30 22


From EC2-2: telnet 10.1.1.10 22

telnet 10.3.3.30 22


From EC2-3: telnet 10.2.2.20 22

telnet 10.3.3.30 22



71 views0 comments

Bình luận


bottom of page