Product Solutions Support
Try MemSQL

Configuring VPC Peering

This topic describes how to configure Amazon Web Services (AWS) VPC Peering with a MemSQL Cloud cluster.

VPC Peering is a feature of AWS that connects two Virtual Private Clouds (VPCs) and enables them to communicate over private IP addresses as though they reside in the same network. You can use VPC Peering to securely connect applications and infrastructure in your Amazon VPC with MemSQL Cloud clusters.

Info

You can only initiate a VPC Peer with a VPC that is located in the us-east-1 region. Other regions are currently not supported.

To configure a VPC Peer with MemSQL Cloud, follow these steps:

  1. Collect VPC Information From Your AWS Account
  2. Create a VPC Peering Request in MemSQL Cloud
  3. Accept the VPC Peering Request and Configure Route Tables

Collect VPC Information From Your AWS Account

To enable VPC Peering, you must first collect the following information from your AWS account:

To get your AWS Account ID

  1. From the AWS Console, click the account drop-down menu, and then click My Account: image

  2. On the Account Settings page, copy the numerical Account ID from the list of information: image

To get the VPC ID of the desired VPC

  1. From the AWS Console, click the Services drop-down menu in the top-left of the page, and then click VPC under the Networking & Content Delivery heading: image

  2. The VPC Dashboard page appears. From the left menu, select Your VPCs, and then select the VPC ID for the desired VPC from the list: image

Create a VPC Peering Request in MemSQL Cloud

After gathering your AWS Account ID and your VPC ID, they can be used to create a VPC Peering request in the MemSQL Cloud Console. This request configures MemSQL Cloud for peering and notifies your AWS account of the desire to peer. To create a VPC Peering request:

  1. From the MemSQL Cloud Console, click Settings, then click VPC Peering, and finally click the Create Connection button: image

  2. In the Describe Your VPC dialog, provide the AWS Account ID and the VPC ID that you gathered in previous steps, and then click the Create button: image

After the VPC Peering request has been created, the VPC Peering Connections page will indicate its current status. It will first enter the Creating status, and then progresses to the Pending Acceptance status. When the VPC Peer is in a Pending Acceptance status, the VPC Peering request must be accepted in the AWS Console to take effect. This process is described in the next section.

Info

After creating the VPC Peering request, it may take a few moments for the request to appear in the AWS Console.

Accept the VPC Peering Request and Configure Route Tables

After initiating a peering request from MemSQL Cloud, you must accept the request in the AWS Console. In addition, the VPC Peer’s route tables must be configured to communicate with MemSQL Cloud.

Info

After accepting the VPC Peering request in the AWS Console, it may take a few moments for the request’s status to be updated in the MemSQL Cloud Console.

  1. From the AWS Console, click the Services drop-down menu in the top-left of the page, and then click VPC under the Networking & Content Delivery heading: image

  2. The VPC Dashboard page appears. From the left menu, select Peering Connections, and then select the request from MemSQL Cloud. From the Actions drop-down menu, click Accept Request: image

  3. After the request has been accepted, the VPC’s route tables must be configured to connect with MemSQL Cloud. First, take note of the MemSQL Cloud CIDR Range and the VPC Peering ID, which can be found in the VPC Peering Connections page in the MemSQL Cloud Console: image

  4. In the AWS Console, click Route Tables from the left menu on the VPC Dashboard, select the route table for the VPC you’re peering with, and then click the Routes tab: image

  5. Click Add another route and enter the two items described in Step 3: the MemSQL Cloud CIDR Range and the VPC Peering ID, and then click the Save button: image

  6. After you’ve added the new route, return to the MemSQL Cloud Console and verify that the VPC Peering connection has been successfully created. On the VPC Peering Connection page, verify that the Status of the connection is Active: image

If the Status is active, your VPC Peering connection has been successfully created. The final step is to add the VPC Peering CIDR address for the given VPC Peer to a new or existing security group, which can be found on the VPC Peering Connections page. For more information on adding CIDR ranges to a security group, see Managing Security Groups.

The following section describes how to terminate an existing VPC Peering connection.

Terminating a VPC Peering Connection

The following steps describe how to terminate a VPC Peering connection.

Warning

After a VPC Peering connection has been terminated, any affiliated clusters will be unreachable until a new VPC Peering connection has been established.

  1. Navigate to the VPC Peering Connections page in the MemSQL Cloud Console, select the connection you want to terminate, and then click the trash can icon next to the connection: image

  2. The Terminate VPC Peer dialog appears. Once again, note that when you terminate a VPC Peering connection, any affected clusters will be unreachable. Select the check box and then click the Terminate button: image

The VPC Peering connection is now terminated, and you can verify that the termination was successful by returning to the VPC Peering Connections page.

VPC Peering Connection Status Descriptions

The status of any given VPC Peering connection is reflected on the VPC Peering Connections page in the MemSQL Cloud Console. The following status descriptions reflect the lifecycle of a VPC Peering connection:

Creation Status Descriptions

Lifecycle Status Description
Creating MemSQL Cloud has acknowledged the request to create a VPC Peering connection and is undergoing additional system configuration. See the Create a VPC Peering Request in MemSQL Cloud section above for more information.
Pending Acceptance MemSQL Cloud is ready to initiate the VPC Peering connection, but the request must be approved in the AWS Console. See the Accept the VPC Peering Request and Configure Route Tables section above for more information.
Active The VPC Peering connection is active in both MemSQL Cloud and in the AWS Console. No further configuration is required.

Termination Status Descriptions

Lifecycle Status Description
Terminating The VPC Peering connection is being terminated and is undergoing additional system configuration.
Terminated The VPC Peering connection has been successfully terminated, and the reason for its termination is reflected in an additional status description.

Termination Status Reasons

When a VPC Peering request has been terminated, the following additional status descriptions are provided as reasoning for the termination:

Termination Reason Description
Termination occurred in AWS. The VPC Peering connection was successfully configured in MemSQL Cloud, but was terminated by AWS.
The VPC Peering request was rejected in AWS. The VPC Peering connection was successfully configured in MemSQL Cloud, but the request was rejected by AWS.
The VPC Peering request has expired. The VPC Peering request was initiated by MemSQL Cloud, but it expired after being sent to AWS.
The VPC Peering request failed in AWS. The VPC Peering request was initiated by MemSQL Cloud, but the request failed after being sent to AWS. More information about the cause of the failure can be found in the AWS Console.
The VPC Peering Connection’s CIDR block overlaps with an existing VPC Peering Connection’s CIDR Block The VPC Peering connection was not successfully configured in MemSQL Cloud because a duplicate or overlapping IP Address CIDR block was provided for more than one VPC Peering connection. Reconfigure the IP Address CIDR for one or more of the VPC Peering connections and attempt to re-establish the connection.
This VPC Peering Connection was terminated in the MemSQL Cloud Console. The VPC Peering connection was manually terminated in the MemSQL Cloud Console.
Was this article useful?