Document has the information about how to setup the connection by VPC peering. This article adds the screenshots of the steps.
Step 1: Create the Peering Connection to connect client VPC and BigAnimal VPC
See below as an example, the requester VPC is the VPC of my client virtual machine, the accepter VPC is BigAnimal VPC.
Note - Approve the request to make sure the Peering Connection is active.
Step 2: Configure the Route tables to add routes of the peering connection at both sides.
1). Add the route at client VPC route table:
Get the route table to edit at VPC page.
Add the route at client VPC route table:
- Destination is `10.0.0.0/16` for BigAnimal
- Target is the Peering Connection created at Step 1
2). Add the route at all 3 route tables at BigAnimal private VPC:
Get the route tables to edit by filter `ManagedBy:BigAnimal` and `private` keywords:
At each route table, click `Edit routes` to add the route:
- Destination is about client box
- Target is the Peering Connection created at Step 1
Note: All 3 route tables are required to add the route.
Step 3: Update the Security Group to allow the inbound traffic to BigAnimal
Get the security group from the BigAnimal Postgres EC2 instance, add the inbound rule:
- Source: client VPC
- Port range: 30000-32767
Test the connection
Get the connection string from BigAnimal Portal cluster page and test the connection:
Troubleshooting
If there is any connection issue, VPC Reachability Analyzer can help determine whether a destination resource is reachable from a source resource, analyze the path and shows the reason of any failure.