Access public apigateway API via VPC endpoint

0

Is it possible to connect a private (within vpc) lambda to a public api via vpc endpoint ?

Currently I am getting 403 forbidden error. I understand that by disabling private DNS option of vpc endpoint I can make lambda go through internet and connect to the public api. But I want to pass the traffic through the vpc endpoint without going to the internet.

Any comments would be appreciated. Thanks

2개 답변
1
수락된 답변
profile pictureAWS
전문가
답변함 2년 전
  • Thanks, yes indeed. The link above states "VPC endpoints can route traffic only to private APIs" so I guess it is not possible.

1

Just to clarify one point: Traffic between your VPC and public services in AWS does not traverse the internet. Yes, there are public IP addresses involved but all traffic stays on the Amazon backbone network. Using public IP addressing does not mean that traffic is over the public Internet.

This is stated in the VPC FAQ - look for "Does traffic go over the internet".

profile pictureAWS
전문가
답변함 2년 전
  • Yes, of course it does not go over the big/wide internet to reach the destination, but gets routed to the AWS public services via the shortest/fastest path (in this case via the Amazon backbone network). What I meant is that it needs some IP translation (NAT gateway) and does not flow only within the private network.

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

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

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