Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 965
Vladimir Venegas Avatar asked Mar 08 '23 00:03

Vladimir Venegas


1 Answers

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.

like image 60
Kannaiyan Avatar answered Apr 06 '23 08:04

Kannaiyan