amazon-web-servicesamazon-lightsaillightsail-container-service

How can I whitelist connections from my Lightsail Container Instance to my MsSQL RDS database


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?


Solution

  • 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.