Associate or disassociate a transit gateway using either the AWS Direct Connect console or using the command line or API.
To associate a transit gateway
Open the AWS Direct Connect console at https://console.aws.amazon.com/directconnect/v2/home
. -
In the navigation pane, choose Direct Connect Gateways and then select the Direct Connect gateway.
-
Choose View details.
-
Choose Gateway associations and then choose Associate gateway.
-
For Gateways, choose the transit gateway to associate.
-
In Allowed prefixes, enter the prefixes (separated by a comma, or on a new line) which the Direct Connect gateway advertises to the on-premises data center. For more information on allowed prefixes, see Allowed prefixes interactions.
-
Choose Associate gateway
You can view all of the gateways that are associated with the Direct Connect gateway by choosing Gateway associations.
To disassociate a transit gateway
Open the AWS Direct Connect console at https://console.aws.amazon.com/directconnect/v2/home
. -
In the navigation pane, choose Direct Connect gateways and then select the Direct Connect gateway.
-
Choose View details.
-
Choose Gateway associations and then select the transit gateway.
-
Choose Disassociate.
To update allowed prefixes for a transit gateway
You can add or remove allowed prefixes to the transit gateway.
Open the AWS Direct Connect console at https://console.aws.amazon.com/directconnect/v2/home
. -
In the navigation pane, choose Direct Connect gateways and then choose the Direct Connect gateway you want to add or remove allowed prefixes for.
-
Choose the Gateway associations tab.
-
Choose the gateway you want to modify allowed prefixes for, and then choose Edit.
-
In Allowed prefixes, enter the prefixes which the Direct Connect gateway advertises to the on-premises data center. For multiple prefixes, separate each prefix by a comma or put each prefix on a new line. The prefixes you add should match the Amazon VPC CIDRs for all virtual private gateways. For more information on allowed prefixes, see Allowed prefixes interactions.
-
Choose Edit association.
In the Gateway association section the State displays updating. When complete, the State changes to associated. This might take several minutes or longer to complete.
To associate a transit gateway using the command line or API
-
CreateDirectConnectGatewayAssociation (AWS Direct Connect API)
To view the transit gateways associated with a Direct Connect gateway using the command line or API
-
DescribeDirectConnectGatewayAssociations (AWS Direct Connect API)
To disassociate a transit gateway using the command line or API
-
DeleteDirectConnectGatewayAssociation (AWS Direct Connect API)
To update allowed prefixes for a transit gateway using the command line or API
-
UpdateDirectConnectGatewayAssociation (AWS Direct Connect API)