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
-
Open the Amazon VPC console at https://console.aws.amazon.com/vpc/
. -
In the navigation pane, choose Route tables, and then select the route table.
-
From the Edge associations tab, choose Edit edge associations.
-
Select or deselect the checkbox for the gateway.
-
Choose Save changes.
To associate or disassociate a gateway with a route table using the AWS 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
-
disassociate-route-table (AWS CLI)
-
Unregister-EC2RouteTable (AWS Tools for Windows PowerShell)