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

10.7k Views Asked by At

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

1

There are 1 best solutions below

2
On BEST ANSWER

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.