Connect Lightsail instance to AWS instance in a private subnet
Hi - I am trying to access Windows SQL server running in a private subnet in AWS from another Windows instance in Lightsail. There are multiple subnets in the same VPC, some are private and others are public. How can (only) allow Lightsail instance to access DBs in SQL server? Thanks
Hi.
Lightsail has a VPC peering feature.
However, you can only peer with the default VPC.
If you have an RDS resource other than the default VPC, you can place the NLB in front of the RDS and use the endpoint service to establish a connection route from the default VPC to the RDS with an IP address target.
https://dev.classmethod.jp/articles/nlb-bastion-for-rds/
I have successfully connected to Lightsail-> Endpoint on Default VPC-> NLB-> RDS with this configuration.
Yes. You can also connect with MSSQL.
Only the port number is different.I tried your scenario and put it together in an article. I verified it with MySQL, but it should work with MSSQL as well.
https://dev.classmethod.jp/articles/lightsail-connect-vpc-rds/
Relevant questions
Lost access to Windows server
minas0810asked 2 years agoNewly Created Lightsail Instances - refused to connect error
flynnd6asked 4 months agoPlacing a Bastion in a Private Isolated Subnet
NetbizUpasked 3 months agoCan you use a signed URL with S3 VPC Endpoint?
Accepted Answerjerasked 6 years agoLightsail Windows Server 2019
asacchettoasked a month agoConnect Lightsail instance to AWS instance in a private subnet
AWS-User-0181798asked 17 days agoEC2 instance in private subnet shows IPv4 address of NAT instance
witchkinkofangmarasked 3 years agoUnable to connect to EC2 instance in private Subnet
ahmeduaeasked 10 months agoaccessing site with custom port and static ip
AWS-User-1816817asked 2 days agoEC2 instance doesn't have access to internet
Altaranasked 2 years ago
Thanks for your response. Will this configuration also work with connecting to MSSQL DB?