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.

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
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠