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

1

5

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

Exactitude answered 20/9, 2017 at 18:37 Comment(4)
Lambda functions can be launched in a VPC. You can have a VPN connection between on-prem and your VPC.Pickerelweed
Is your private network on AWS or on prem?Cowpox
@Cowpox my private network is on premiseExactitude
@KrishnaKumarR Is an option, but my goal is to build a native serverless app. I don't want to manage EC2 instances. And this app need some data that is provided by an internal service in our private networkExactitude
O
8

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.

Observation answered 20/9, 2017 at 19:18 Comment(2)
this lambda function, if run in a VPC context, can be triggered by a kinesis event?Exactitude
I did verify the configuration we used, it did work with Kinesis and HTTP trigger as well. All configuration related to those are taken care by the cloud.Observation

© 2022 - 2024 — McMap. All rights reserved.