Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Control traffic entering your VPC with a gateway route table

Focus mode
Control traffic entering your VPC with a gateway route table - Amazon Virtual Private Cloud

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.aws.amazon.com/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 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
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.