Connection Timed Out when attempting to connect to an Aurora DB from a second VPC

1.6k Views Asked by At

I have two VPCs in the same account and the same Availability Zone. In the first VPC I have an EC2 instance and a Aurora DB (which has a single Endpoint and a Cluster Endpoint). In the second VPC I have another EC2 instance.

The first EC2 instance can connect to the Aurora DB Cluster Endpoint with no issues (again; both in the same VPC). I'm trying to connect the second EC2 instance (in the second VPC) to the same Aurora DB Cluster Endpoint (in the first VPC).

The first VPC has CIDR of 172.31.0.0/16. The second VPC has a CIDR of 10.0.0.0/28. Both VPCs have DNS hostnames set to Yes. I am not using IAM database authentication.

I created a VPC Peering Connection, and the connection reports itself as being Active. The connection has the correct VPCs in it's Route Table and "Allow DNS resolution from peer VPC () to Private IP" is checked for both VPCs. The first VPC is the default and has 3 subnets. The second VPC has one subnet.

But the second EC2 instance (in the second VPC) times out when it tries to connect to the Aurora DB. I'm using the same Cluster Endpoint name in the second EC2 instance as I'm using in the first. Both EC2 instances are using exactly the same connection strings.

0

There are 0 best solutions below