Subchapter 90.7
references/migrating-direct-connect-from-a-virtual-private-gateway-to-a-transit-gateway.mdMarkdown9 KBView on GitHub
Domain expertise for moving a Direct Connect setup from the virtual private gateway model to the transit gateway model without dropping production traffic. Covers why the two paths use different virtual interface types, why a separate Direct Connect gateway is needed rather than an in-place conversion, the cutover order that keeps traffic flowing, and the allowed prefixes and unique Autonomous System Number requirements that block the new path silently if missed.
Does not cover the first-time connection or virtual interface setup, the general Direct Connect gateway reference (which this builds on), encryption, or resiliency. Those are separate references.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. The Direct Connect console is regional; pass the
customer’s working --region. A Direct Connect gateway is a global resource reached through a
regional view.
The virtual private gateway path uses a private virtual interface; the transit gateway path uses a transit virtual interface to a Direct Connect gateway. The safe migration builds the transit path alongside the existing one and removes the old path last.
Constraints:
Constraints:
Constraints:
The old virtual private gateway path was removed before the transit path was advertising routes. Build and verify the new path first; remove the old one last.
One Direct Connect gateway cannot hold both association types. Provision a separate Direct Connect gateway for the transit path.
The transit gateway and Direct Connect gateway share an Autonomous System Number. Change one.
The allowed prefixes list on the transit gateway association is empty. Add the prefixes.
This procedure builds the transit path on a new Direct Connect gateway, verifies it end to end, shifts traffic, and removes the old virtual private gateway path last, surfacing the console link.
Constraints for parameter acquisition:
Constraints:
aws sts get-caller-identity.aws sts assume-role)
rather than long-lived IAM user access keys for Direct Connect management operations.Constraints:
You MUST create a separate Direct Connect gateway and a transit virtual interface for the transit path, leaving the existing private virtual interface in place and carrying traffic.
You MUST create the transit gateway association with distinct ASNs and the allowed prefixes:
aws directconnect create-direct-connect-gateway-association \
--direct-connect-gateway-id {new_dx_gateway_id} --gateway-id {transit_gateway_id} \
--add-allowed-prefixes-to-direct-connect-gateway cidr={allowed_prefixes} --region {region}Capture the associationId from the response as {association_id}.
You MUST poll until the association reaches associated state:
aws directconnect describe-direct-connect-gateway-associations \
--association-id {association_id} \
--query 'directConnectGatewayAssociations[0].associationState' --output text --region {region}Constraints:
associated state, and confirm routes advertise both ways, before shifting traffic.directconnect API calls with log
file validation enabled and the trail encrypted with a KMS key, and any CloudWatch Logs log groups
receiving these events or alarm state data encrypted with a KMS key, so state changes trigger alerts
and configuration changes are audited with assured log integrity and confidentiality rather than
relying on manual detection.Constraints:
Constraints:
You MUST present the new Direct Connect gateway console link, filling {new_dx_gateway_id} and
{region}:
https://console.aws.amazon.com/directconnect/v2/home?region={region}#/dxgateways/{new_dx_gateway_id}aws sts assume-role) for Direct Connect management operations rather than long-lived
IAM user access keys.directconnect API actions to the
specific actions and resource ARNs each principal needs, and MUST NOT grant directconnect:* on
resource * or attach any *FullAccess managed policy.