AWS Lambda to on-premise via direct connect and AWS PrivateLink?

0

Hi,

I'd like to understand if traffic from AWS Lambda functions to an on-premise environment is allowed, if the functions are placed outside the VPC but leveraging AWS PrivateLink with an Lambda Endpoint? (see image below)

I believe from on-premise to Lambda is possible but i'm looking for confirmation if the other way around is possible.

Enter image description here

Thanks for any thoughts in advance.

Mart
已提問 1 年前檢視次數 1947 次
1 個回答
1
已接受的答案

Hi Mart,

I understand you are looking to connect your Lambda functions to your on-premises environment that is connected to your VPC via Direct Connect, as follows:

Lambda -> VPC -> DX -> on-premises environment

And you would like to know if using PrivateLink is required so the Lamba function uses a Lambda endpoint to connect to your VPC, then DX, then on-premises. Please, let me know if my assumption is incorrect.

Do note that Lambda endpoints are inbound endpoints meaning you use them to call your Lambda functions without using the internet hence all your traffic remains private, as in:

HTTP client -> Lambda endpoint -> Lambda service -> Lambda function

So Lambda endpoints are not outbound endpoints.

From a networking perspective, all Lambda functions (whether yours or other’s) are located, or deployed, inside Lambda service’s VPC. In order for your Lambda function to access your own VPC, what’s happening under the hood is that the Lambda service is using PrivateLink to connect its own service VPC to your own VPC, as in:

Lambda service VPC -> PrivateLink -> your own VPC -> resources hosted in your VPC

Therefore, once you have configured your Lambda to be deployed (or connected) to your VPC [1], as long as your VPC has connectivity to your data center, it will be allowed to route the traffic towards it - whether it uses Direct Connect or other connections, like VPN.

In case my answer doesn’t address your question or you have any follow-up, please let me know.

Hope it helps,

Rocky

References:

[1] Configuring a Lambda function to access resources in a VPC - https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html

profile pictureAWS
已回答 1 年前
profile pictureAWS
專家
已審閱 1 年前
profile pictureAWS
專家
已審閱 1 年前
  • Hi Rocky,

    I appreciate your in-depth answer and thanks for taking the time to follow-up.

    I think its most clear, and we'll take this into consideration for our next architectural decicions.

    Thanks.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南