Create a VPC peering connection - Amazon Virtual Private Cloud

Create a VPC peering connection

To create a VPC peering connection, first create a request to peer with another VPC. You can request a VPC peering connection with another VPC in your account, or with a VPC in a different AWS account. For an inter-Region VPC peering connection where the VPCs are in different Regions, the request must be made from the Region of the requester VPC.

To activate the request, the owner of the accepter VPC must accept the request. For an inter-Region VPC peering connection, the request must be accepted in the Region of the accepter VPC. For more information, see Accept a VPC peering connection. For more information about the Pending acceptance peering connection status, see VPC peering connection lifecycle.

Prerequisites

  • Review the limitations and rules for VPC peering connections.

  • Ensure that your VPCs do not have overlapping IPv4 CIDR blocks. If they overlap, the status of the VPC peering connection immediately goes to failed. This limitation applies even if the VPCs have unique IPv6 CIDR blocks.

Create with VPCs in the same account and Region

To create a VPC peering connection with VPCs in the same account and Region
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Peering connections.

  3. Choose Create peering connection.

  4. Configure the following information, and choose Create peering connection when you are done:

    • Name: You can optionally name your VPC peering connection.

    • VPC ID (Requester): Select the VPC in your account with which you want to create the VPC peering connection.

    • For Select another VPC to peer with, choose My account and select another of your VPCs.

    • (Optional) To add a tag, choose Add new tag and enter the tag key and value.

  5. Choose Actions, Accept request.

  6. When prompted for confirmation, choose Accept request.

  7. Choose Modify my route tables now to add a route to the VPC route table so that you can send and receive traffic across the peering connection. For more information, see Update your route tables for a VPC peering connection.

Create with VPCs in the same account and different Regions

To create a VPC peering connection with VPCs in the same account and different Regions
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Peering connections.

  3. Choose Create peering connection.

  4. Configure the following information, and choose Create peering connection when you are done:

    • Name: You can optionally name your VPC peering connection. Doing so creates a tag with a key of Name and the value that you specify.

    • VPC ID (Requester): Select the requester VPC in your account with which to request the VPC peering connection.

    • Account: Choose My account.

    • Region: Choose Another region and select the Region ifor the accepter VPC.

    • VPC ID (Accepter): Select the accepter VPC.

  5. In the Region selector, select the Region of the accepter VPC.

  6. In the navigation pane, choose Peering connections. Select the VPC peering connection that you created, and choose Actions, Accept request.

  7. When prompted for confirmation, choose Accept request.

  8. Choose Modify my route tables now to add a route to the VPC route table so that you can send and receive traffic across the peering connection. For more information, see Update your route tables for a VPC peering connection.

Create with VPCs in different accounts and the same Region

To request a VPC peering connection with VPCs in different accounts and the same Region
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Peering connections.

  3. Choose Create peering connection.

  4. Configure the information as follows, and choose Create peering connection when you are done:

    • Name: You can optionally name your VPC peering connection. Doing so creates a tag with a key of Name and a value that you specify. This tag is only visible to you; the owner of the peer VPC can create their own tags for the VPC peering connection.

    • VPC ID (Requester): Select the VPC in your account with which to create the VPC peering connection.

    • Account: Choose Another account.

    • Account ID: Enter the ID of the AWS account that owns the accepter VPC.

    • VPC ID (Accepter): Enter the ID of the VPC with which to create the VPC peering connection.

Create with VPCs in different accounts and Regions

To request a VPC peering connection with VPCs in different accounts and Regions
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Peering connections.

  3. Choose Create peering connection.

  4. Configure the information as follows, and choose Create peering connection when you are done:

    • Name: You can optionally name your VPC peering connection. Doing so creates a tag with a key of Name and a value that you specify. This tag is only visible to you; the owner of the peer VPC can create their own tags for the VPC peering connection.

    • VPC ID (Requester): Select the VPC in your account with which to create the VPC peering connection.

    • Account: Choose Another account.

    • Account ID: Enter the ID of the AWS account that owns the accepter VPC.

    • Region: Choose Another region and select the Region in which the accepter VPC resides.

    • VPC ID (Accepter): Enter the ID of the VPC with which to create the VPC peering connection.

Create a VPC peering connection using the command line

You can create a VPC peering connection using the following commands: