Create Transit Gateway Attachments

Create Transit Gateway Attachments

Overview

In this section, you will configure Transit Gateway Attachments to assign VPCs to the created Transit Gateway.

AWS Transit Gateway

Create Transit Gateway Attachments

  1. Open VPC Management Console, select Transit Gateway Attachments in the left sidebar, and select Create Transit Gateway Attachment.

Transit Gateway Route Tables

  1. On the Create Transit Gateway Attachment page, select the following parameters and select Create attachment:
  • Transit Gateway ID: select the ID of the generated Transit Gateway.
  • Attachment type: select VPC to format the assigned object as VPC

Transit Gateway Route Tables

  1. Continue configuration.
  • Attachment name tag: enter the VPC corresponding to the VPC ID (Example: VPC1)
  • VPC ID: select First VPC, ie VPC1.
  • Subnet ID: in this infrastructure, each VPC contains only one subnet. Therefore, you only have one option of subnetting in a certain AZ.
  • Select Create transit gateway attachment

Transit Gateway Route Tables

  1. Create Transit Gateway Attachment 1 for VPC1 successfully.

Transit Gateway Route Tables

  1. Create Transit Gateway Attachment 2 for VPC2.

Transit Gateway Route Tables

  1. Same configuration.

Transit Gateway Route Tables

  1. Same configuration.

Transit Gateway Route Tables

  1. Create Transit Gateway Attachment 2 for VPC2 successfully.

Transit Gateway Route Tables

  1. Create Transit Gateway Attachment 3 for VPC3.

Transit Gateway Route Tables

  1. Same configuration.

Transit Gateway Route Tables

  1. Create Transit Gateway Attachment 4 for VPC4 successfully.

Transit Gateway Route Tables

  1. Same configuration.

Transit Gateway Route Tables

  1. Create Transit Gateway Attachment 4 for VPC4 successfully.

Transit Gateway Route Tables

  1. So you have successfully created 4 Transit Gateway Attachment for VPCs. Note that each VPC has only 1 subnet, but in a production environment, you will usually attach all the subnets to the Transit Gateway.

Transit Gateway Route Tables

  1. Now, connect SSH to the instances in VPC1. (With the command ping <EC2 Public IPv4> -c5)

To connect SSH to EC2 we have a way. Connect Amazon EC2 Linux 2 using MobaXterm and connect Amazon EC2 Linux 2 using PuTTY. Here I connect Amazon EC2 Linux 2 using PuTTY.

You can review how to connect SSH to EC2 access at Lab About Amazon EC2 section 4.2 .

Transit Gateway Route Tables

  1. Try pinging the private IP addresses of other instances. This won’t work because assigning VPCs to the Transit Gateway does not create routing tops on its own in this case because the Default route table association and Default route table propagation configurations have been disabled. disable in the creation of Transit Gateway first. The image above shows a failed ping from First EC2 Host to Second EC2 Host.

Transit Gateway Route Tables

  1. Now connect SSH to instances at VPC3.

Transit Gateway Route Tables

  1. Try pinging the private IP addresses of other instances. This won’t work because assigning VPCs to the Transit Gateway does not create routing tops on its own in this case because the Default route table association and Default route table propagation configurations have been disabled. disable in the Transit Gateway creation first. The image above shows a failed ping from Third EC2 Host to Fourth EC2 Host.

Transit Gateway Route Tables