The VPC service also allows you to create a VPC peering connection with a VPC in another account. The two VPCs must be in the same region. If you request a VPC peering connection with a VPC in another account in the same region, the owner of the peer account must accept the request to activate the connection.
Parameter |
Description |
Example Value |
---|---|---|
Name |
Specifies the name of the VPC peering connection. The name contains a maximum of 64 characters, which consist of letters, digits, hyphens (-), and underscores (_). |
peering-001 |
Local VPC |
Specifies the local VPC. You can select one from the drop-down list. |
vpc_002 |
Account |
Specifies the account to which the VPC to peer with belongs.
|
Another account |
Peer Project ID |
This parameter is available only when Another account is selected. For details about how to obtain the peer project ID, see Obtaining the Peer Project ID. |
- |
Peer VPC ID |
This parameter is available only when Another account is selected. For details about how to obtain the peer VPC ID, see Obtaining the Peer VPC ID. |
65d062b3-40fa-4204-8181-3538f527d2ab |
To request a VPC peering connection with a VPC in another account, the owner of the peer account must accept the request to activate the connection.
The owner of the peer account can reject any VPC peering connection request that they receive. If a VPC peering connection request is rejected, the connection will not be established. You must delete the rejected VPC peering connection request before creating a VPC peering connection between the same VPCs as those in the rejected request.
If you request a VPC peering connection with a VPC in another account, the owner of the peer account must accept the request. To enable communication between the two VPCs, you need to add routes for the VPC peering connection. The owner of the local account can add only the local route because the owner does not have the required permission to perform operations on the peer VPC. The owner of the peer account must add the peer route. The procedure for adding a local route and a peer route is the same.
Parameter |
Description |
Example Value |
---|---|---|
Destination |
Specifies the destination address. Set it to the peer VPC or subnet CIDR block. |
192.168.2.0/24 |
Next Hop |
Specifies the next hop address. The default value is the VPC peering connection ID. Keep the default value. |
d1a7863b-9d5e-4d27-8eaf-ab14d2a9148b |
After the VPC peering connection is created, the two VPCs can communicate with each other through private IP addresses. You can run the ping command to check whether the two VPCs can communicate with each other.
If two VPCs cannot communicate with each other, check the configuration by following the instructions provided in Why Did Communication Fail Between VPCs That Were Connected by a VPC Peering Connection?