Part 2: Virtual Private Cloud Peering with AWS.

In my previous column, we discussed some of the limitations and considerations associated with peering in virtual private cloud (VPC), Amazon Web Services (AWS). This article will continue the discussion and show you how to set up VPC peering.
Peering, as you may have recalled from the previous installments, is the process of establishing logical connectivity between two AWS VPCs. This allows instances in one VPCs to communicate with instances in the other. These VPCs may exist in one AWS account or two separate AWS accounts.
Log in to AWS and click on the link to set up a peer connection between two VPCs. The VPC option can be found in the Networking & Content delivery section. Click on the link for Peering Connections to open the VPC dashboard. As shown in Figure 1, the screen will contain a large blue button that says Create VPC peering connection. Click on this button.
Figure 1: Click on the Create VPC peering connection button. The console will now display the Create VPC Peering Connection window. Figure 2 shows it. You only have four options to configure, as you can see from the figure.
[Click on the image to see a larger version.] Figure 2: This dialog box is used to configure VPC peering. The Name Tag option is the first option in the figure. AWS uses tags to identify resources. VPC peering is not the only use of tags, but tags are used throughout AWS.
Enter a name to identify the peering connection using the Name Tag option. AWS will create a key/value pairing when you do this. The key name is Name, and the value is what you specified in the tag.
The Local VPC to peer option is the second option you will need. This is where you can specify a VPC in your AWS account. The VPC you choose will be the point of origin for peering connections.
AWS doesn’t allow you to select a VPC simply from a list. You can search for the VPC you want by entering its ID, or its name (as specified by a tag). Figure 3 shows that the Your VPCs container includes a list of all VPCs within the account. Each VPC also contains a VPCID. This ID can be used for identifying the VPC during setting up a peering link. Although the VPC in this image has not been given a name yet, you can use its name to identify it when setting up a peering connection.
Figure 3: Each VPC is assigned an ID and optional name. Next, you will need to specify the location of your VPC with whom you want to create a peering link. As shown in Figure 2, you have the option to specify a VPC either within your account or within another account.
Next, you will need the VPC to which you want to connect. If you want to create a peering relationship with another VPC within your account, you will need to enter the VPC’s ID or name, just like you did for the Local VPC To Peer option. As shown in Figure 4, you will need to enter the account ID if you want to connect to a VPC from another account. It is important to note that if you connect to a VPC associated with another account you will need to identify the remote VPC using its ID. The VPC cannot be specified by name.
[Click on the image to see a larger view.] Figure 4: AWS offers the option to connect to a VPC belonging to another AWS account. This brings up an important point. If you try to establish a connection with a VPC in another AWS account, the account owner will receive a VPC peering request. This request will be displayed in the VPC Peering Connections screen.