1

I have both a Ubuntu based Instance/VM as well as a Ubuntu based container service running in Lightsail currently. Additionally I have a MsSQL RDS instance running in AWS in the same region in the regions default VPC.

I managed to successfully activate VPC peering in my Lightsail account. Additionally I have whitelisted connections from any Lightsail services by allowing connections from the full 172.26.0.0/16 IP range that Lightsail services use. This has allowed me to connect from my regular Instance/VM without issues. However from my Lighstail Container Service attempts to connect to the database timeout.

How can I get this working?

asked Dec 4, 2024 at 14:26
1
  • I now also whitelisted Lightsails IPv6 IP range 2600:1f18:10ff:4c00::/56 as well just in case its connecting via IPv6 and this did not help as well Commented Dec 4, 2024 at 16:00

2 Answers 2

2

Make sure to verify that the routes are correctly set up in the subnet where your RDS instance is located. To do this: • Go to the VPC settings in your AWS Console. • Navigate to Subnets and select the subnet where your RDS instance is located. • Click on Route Tables.

There should be a route similar to this: • Destination: 172.26.0.0/16 • Target: pcx-******** (your VPC peering connection).

For some reason, when a peering connection is created, it doesn’t automatically add routes for subnets associated with an Internet Gateway (if that’s your case). You’ll need to manually add the route to enable communication.

answered Dec 5, 2024 at 4:45
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, with your help I figured out that contrary to what I thought the RDS instance was not connected to the regions default VPC. Once I switched the RDS database to the correct VPC everything started working correctly
0

It turns out that my RDS MsSQL was not in the region's default VPC like I thought. Once I moved the instance to the correct VPC everything started working properly.

answered Dec 5, 2024 at 16:14

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.