Transit gateway route tables - Amazon VPC

Transit gateway route tables

Use transit gateway route tables to configure routing for your transit gateway attachments.

Create a transit gateway route table

To create a transit gateway route table using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Choose Create transit gateway route table.

  4. (Optional) For Name tag, type a name for the transit gateway route table. This creates a tag with the tag key "Name", where the tag value is the name that you specify.

  5. For Transit gateway ID, select the transit gateway for the route table.

  6. Choose Create transit gateway route table.

To create a transit gateway route table using the AWS CLI

Use the create-transit-gateway-route-table command.

View transit gateway route tables

To view your transit gateway route tables using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. (Optional) To find a specific route table or set of tables, enter all or part of the name, keyword, or attribute in the filter field.

  4. Select the check box for a route table, or choose its ID, to display information about its associations, propagations, routes, and tags.

To view your transit gateway route tables using the AWS CLI

Use the describe-transit-gateway-route-tables command.

To view the routes for a transit gateway route table using the AWS CLI

Use the search-transit-gateway-routes command.

To view the route propagations for a transit gateway route table using the AWS CLI

Use the get-transit-gateway-route-table-propagations command.

To view the associations for a transit gateway route table using the AWS CLI

Use the get-transit-gateway-route-table-associations command.

Associate a transit gateway route table

You can associate a transit gateway route table with a transit gateway attachment.

To associate a transit gateway route table using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table.

  4. In the lower part of the page, choose the Associations tab.

  5. Choose Create association.

  6. Choose the attachment to associate and then choose Create association.

To associate a transit gateway route table using the AWS CLI

Use the associate-transit-gateway-route-table command.

Delete an association for a transit gateway route table

You can disassociate a transit gateway route table from a transit gateway attachment.

To disassociate a transit gateway route table using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table.

  4. In the lower part of the page, choose the Associations tab.

  5. Choose the attachment to disassociate and then choose Delete association.

  6. When prompted for confirmation, choose Delete association.

To disassociate a transit gateway route table using the AWS CLI

Use the disassociate-transit-gateway-route-table command.

Propagate a route to a transit gateway route table

Use route propagation to add a route from an attachment to a route table.

To propagate a route to a transit gateway attachment route table
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table for which to create a propagation.

  4. Choose Actions, Create propagation.

  5. On the Create propagation page, choose the attachment.

  6. Choose Create propagation.

To enable route propagation using the AWS CLI

Use the enable-transit-gateway-route-table-propagation command.

Disable route propagation

Remove a propagated route from a route table attachment.

To disable route propagation using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table to delete the propagation from.

  4. On the lower part of the page, choose the Propagations tab.

  5. Select the attachment and then choose Delete propagation.

  6. When prompted for confirmation, choose Delete propagation.

To disable route propagation using the AWS CLI

Use the disable-transit-gateway-route-table-propagation command.

Create a static route

You can create a static route for a VPC, VPN, or transit gateway peering attachment, or you can create a blackhole route that drops traffic that matches the route.

Static routes in a transit gateway route table that target a VPN attachment are not filtered by the Site-to-Site VPN. This might allow unintended outbound traffic flow when using a BGP-based VPN.

To create a static route using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table for which to create a route.

  4. Choose Actions, Create static route.

  5. On the Create static route page, enter the CIDR block for which to create the route, and then choose Active.

  6. Choose the attachment for the route.

  7. Choose Create static route.

To create a blackhole route using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table for which to create a route.

  4. Choose Actions, Create static route.

  5. On the Create static route page, enter the CIDR block for which to create the route, and then choose Blackhole.

  6. Choose Create static route.

To create a static route or blackhole route using the AWS CLI

Use the create-transit-gateway-route command.

Delete a static route

You can delete static routes from a transit gateway route table.

To delete a static route using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table for which to delete the route, and choose Routes.

  4. Choose the route to delete.

  5. Choose Delete static route.

  6. In the confirmation box, choose Delete static route.

To delete a static route using the AWS CLI

Use the delete-transit-gateway-route command.

Replace a static route

You can replace a static route in a transit gateway route table with a different static route.

To replace a static route using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Choose the route that you want to replace in the route table.

  4. In the details section, choose the Routes tab.

  5. Choose Actions, Replace static route.

  6. For the Type, choose either Active or Blackhole.

  7. From the Choose attachment drop-down, choose the transit gateway that will replace the current one in the route table.

  8. Choose Replace static route.

To replace a static route using the AWS CLI

Use the replace-transit-gateway-route command.

Export route tables to Amazon S3

You can export the routes in your transit gateway route tables to an Amazon S3 bucket. The routes are saved to the specified Amazon S3 bucket in a JSON file.

To export transit gateway route tables using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Choose the route table that includes the routes to export.

  4. Choose Actions, Export routes.

  5. On the Export routes page, for S3 bucket name, type the name of the S3 bucket.

  6. To filter the routes exported, specify filter parameters in the Filters section of the page.

  7. Choose Export routes.

To access the exported routes, open the Amazon S3 console at https://console.aws.amazon.com/s3/, and navigate to the bucket that you specified. The file name includes the AWS account ID, AWS Region, route table ID, and a timestamp. Select the file and choose Download. The following is an example of a JSON file that contains information about two propagated routes for VPC attachments.

{ "filter": [ { "name": "route-search.subnet-of-match", "values": [ "0.0.0.0/0", "::/0" ] } ], "routes": [ { "destinationCidrBlock": "10.0.0.0/16", "transitGatewayAttachments": [ { "resourceId": "vpc-0123456abcd123456", "transitGatewayAttachmentId": "tgw-attach-1122334455aabbcc1", "resourceType": "vpc" } ], "type": "propagated", "state": "active" }, { "destinationCidrBlock": "10.2.0.0/16", "transitGatewayAttachments": [ { "resourceId": "vpc-abcabc123123abca", "transitGatewayAttachmentId": "tgw-attach-6677889900aabbcc7", "resourceType": "vpc" } ], "type": "propagated", "state": "active" } ] }

Delete a transit gateway route table

To delete a transit gateway route table using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Route Tables.

  3. Select the route table to delete.

  4. Choose Actions, Delete transit gateway route table.

  5. Enter delete and choose Delete to confirm the deletion.

To delete a transit gateway route table using the AWS CLI

Use the delete-transit-gateway-route-table command.