title: How to connect to a private server from AWS Lambda with AWS site to site VPN connection?
body: <p>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.</p>
  <p>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.</p>
  <p>Can anyone please give me any resource or suggest the steps on how I should actually do it?</p>
  <p>I've followed the following steps:</p>
  <ol>
  <li>Created a VPC with a CIDR.</li>
  <li>Created a private subnet from that VPC (let's say it's named subnet-1)</li>
  <li>Added a site-to-site VPN, connected it to the private server and attached the VPC to the VPN connection.</li>
  <li>Created a Lambda within the subnet-1.</li>
  <li>Tried to ping the private server, but failed.</li>
  </ol>
  <p><em>I'm not providing any code or any screenshot as this might make this question too long</em></p>
  <p><em><strong>Update: The issue is solved. I had a wrong configuration in the router table. After fixing that, it worked.</strong></em></p>