'How to connect to a private server from AWS Lambda with AWS site to site VPN connection?
I am trying to connect to a private server running on a windows machine from my AWS Lambda. The goal is to get some data from that server in the Lambda and work with it.
I've created a site-to-site VPN connection with that private server and the tunnels are up. I've put my lambda on the VPC that is connected to the site-to-site VPN. But still I can't connect to the server.
Can anyone please give me any resource or suggest the steps on how I should actually do it?
I've followed the following steps:
- Created a VPC with a CIDR.
- Created a private subnet from that VPC (let's say it's named subnet-1)
- Added a site-to-site VPN, connected it to the private server and attached the VPC to the VPN connection.
- Created a Lambda within the subnet-1.
- Tried to ping the private server, but failed.
I'm not providing any code or any screenshot as this might make this question too long
Update: The issue is solved. I had a wrong configuration in the router table. After fixing that, it worked.
Solution 1:[1]
There are several things that can cause the connectivity to fail:
- Are there NACLs that prevents the traffic from flowing outside of the subnet?
- Is the lambda armed with a security group that allows passage towards the windows server?
- Is the VPN fully working at the time of testing?
- Are there any network firewalls on the on-premise network that prevents the traffic from the lambda to flow?
- Do the CIDRs of the VPC collide with the CIDRs of the on-premise network?
- I would usually assign compatible subnets between my VPC and on-premise site to make this work.
- UPDATE: As per question's author, he faced router table related issue that prevents propagation of traffic between on-premise and AWS-based network.
These are the questions that I tend to ask when running into this problems but there could be other things that can cause your issue. Hope these checks help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
