Search code examples
amazon-web-servicesaws-lambdavpnaws-direct-connect

Can an aws lambda function make a post to a endpoint that is in a private network?


I want to know if is possible that a lambda function access to an endpoint that is in my private network, and that is not exposed to internet.

I was thinking use AWS Direct Connect to make a VPN between my private network (on premise) and AWS region; but i can't find any example on how configure the VPN on the lambda function.

Thanks you very much


Solution

  • This is how I would solve,

    Create a VPC in AWS. Configure the lambda to run in that configured VPC. Create a VPN Connection to your VPC. Now your private resources will be available to your Lambda.

    Documentation on running Lambda in your VPC:

    https://aws.amazon.com/blogs/aws/new-access-resources-in-a-vpc-from-your-lambda-functions/

    VPC VPN Configuration:

    http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html

    Hope it helps.