Associating a virtual private gateway across accounts - Amazon Direct Connect
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).

Associating a virtual private gateway across accounts

You can associate a Direct Connect gateway with a virtual private gateway that is owned by any Amazon account. The Direct Connect gateway can be an existing gateway, or you can create a new gateway. The owner of the virtual private gateway creates an association proposal and the owner of the Direct Connect gateway must accept the association proposal.

An association proposal can contain prefixes that will be allowed from the virtual private gateway. The owner of the Direct Connect gateway can optionally override any requested prefixes in the association proposal.

Allowed prefixes

When you associate a virtual private gateway with a Direct Connect gateway, you specify a list of Amazon VPC prefixes to advertise to the Direct Connect gateway. The prefix list acts as a filter that allows the same CIDRs, or smaller CIDRs to be advertised to the Direct Connect gateway. You must set the Allowed prefixes to a range that is the same or wider than the VPC CIDR because we provision entire VPC CIDR on the virtual private gateway.

Consider the case where the VPC CIDR is 10.0.0.0/16. You can set the Allowed prefixes to 10.0.0.0/16 (the VPC CIDR value), or 10.0.0.0/15 ( a value that is wider than the VPC CIDR).

Any virtual interface inside network prefixes advertised over Direct Connect are only propagated to transit gateways across Regions, not within the same Region. For more information on how allowed prefixes interact with virtual private gateways and transit gateways, see Allowed prefixes interactions.

Creating an association proposal

If you own the virtual private gateway, you must create an association proposal. The virtual private gateway must be attached to a VPC in your Amazon account. The owner of the Direct Connect gateway must share the ID of the Direct Connect gateway and the ID of its Amazon account. After you create the proposal, the owner of the Direct Connect gateway must accept it in order for you to gain access to the on-premises network over Amazon Direct Connect.

To create an association proposal
  1. Open the Amazon Direct Connect console at https://console.aws.amazon.com/directconnect/v2/home.

  2. In the navigation pane, choose Virtual private gateways and select the virtual private gateway.

  3. Choose View details.

  4. Choose Direct Connect gateway associations and choose Associate Direct Connect gateway.

  5. Under Association account type, for Account owner, choose Another account.

  6. For Direct Connect gateway owner, enter the id of the Amazon account that owns the Direct Connect gateway.

  7. Under Association settings, do the following:

    1. For Direct Connect gateway ID, enter the ID of the Direct Connect gateway.

    2. For Direct Connect gateway owner, enter the ID of the Amazon account that owns the Direct Connect gateway for the association.

    3. (Optional) To specify a list of prefixes to be allowed from the virtual private gateway, add the prefixes to Allowed prefixes, separating them using commas, or entering them on separate lines.

  8. Choose Associate Direct Connect gateway.

To create an association proposal using the command line or API

Accepting or rejecting an association proposal

If you own the Direct Connect gateway, you must accept the association proposal in order to create the association. Otherwise, you can reject the association proposal.

To accept an association proposal
  1. Open the Amazon Direct Connect console at https://console.aws.amazon.com/directconnect/v2/home.

  2. In the navigation pane, choose Direct Connect gateways.

  3. Select the Direct Connect gateway with pending proposals and choose View details.

  4. On the Pending proposals tab, select the proposal and choose Accept proposal.

  5. ((Optional) To specify a list of prefixes to be allowed from the virtual private gateway, add the prefixes to Allowed prefixes, separating them using commas, or entering them on separate lines.

  6. Choose Accept proposal.

To reject an association proposal
  1. Open the Amazon Direct Connect console at https://console.aws.amazon.com/directconnect/v2/home.

  2. In the navigation pane, choose Direct Connect gateways.

  3. Select the Direct Connect gateway with pending proposals and choose View details.

  4. On the Pending proposals tab, select the virtual private gateway and choose Reject proposal.

  5. In the Reject proposal dialog box, enter Delete and choose Reject proposal.

To view association proposals using the command line or API
To accept an association proposal using the command line or API
To reject an association proposal using the command line or API

Updating the allowed prefixes for an association

You can update the prefixes that are allowed from the virtual private gateway over the Direct Connect gateway.

If you're the owner of the virtual private gateway, create a new association proposal for the same Direct Connect gateway and virtual private gateway, specifying the prefixes to allow.

If you're the owner of the Direct Connect gateway, update the allowed prefixes when you accept the association proposal or update the allowed prefixes for an existing association as follows.

To update the allowed prefixes for an existing association using the command line or API

Deleting an association proposal

The owner of the virtual private gateway can delete the Direct Connect gateway association proposal if it is still pending acceptance. After an association proposal is accepted, you can't delete it, but you can disassociate the virtual private gateway from the Direct Connect gateway. For more information, see Associating and disassociating virtual private gateways.

To delete an association proposal
  1. Open the Amazon Direct Connect console at https://console.aws.amazon.com/directconnect/v2/home.

  2. In the navigation pane, choose Virtual private gateways and select the virtual private gateway.

  3. Choose View details.

  4. Choose Pending Direct Connect gateway associations, select the association and choose Delete association.

  5. In the Delete association proposal dialog box, enter Delete and choose Delete.

To delete a pending association proposal using the command line or API