Control traffic entering your VPC with a gateway route table - Amazon Virtual Private Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Control traffic entering your VPC with a gateway route table

To control traffic entering your VPC with a gateway route table, you can associate or disassociate an internet gateway or a virtual private gateway with a route table. For more information, see Gateway route tables.

To associate or disassociate a gateway with a route table using the console
  1. Open the Amazon VPC console at https://console.amazonaws.cn/vpc/.

  2. In the navigation pane, choose Route tables, and then select the route table.

  3. From the Edge associations tab, choose Edit edge associations.

  4. Select or deselect the checkbox for the gateway.

  5. Choose Save changes.

To associate or disassociate a gateway with a route table using the Amazon CLI

Use the associate-route-table command. The following example associates internet gateway igw-11aa22bb33cc44dd1 with route table rtb-01234567890123456.

aws ec2 associate-route-table --route-table-id rtb-01234567890123456 --gateway-id igw-11aa22bb33cc44dd1
To disassociate a gateway from a route table using the command line