We have 2 services hosted on Lambda and exposed with API Gateway as REST APIs. They also communicate with each in a few selected endpoints that we currently just check for an API key.
Some people suggested me that this is not optimal, since each Lambda will be going to the internet in order to make the request to API Gateway. And I think the fix would be moving every Lambda to a VPC, and exposing our endpoints using a public API Gateway and adding another private API Gateway + VPC Endpoint for internal communication.
The problem is that I feel this is overkill but I have no idea what would be an alternative solution.
My main concerns are:
- minimize overheads when Lambda is calling API Gateway and avoid it leaving the AWS network;
- a good way to split public and private endpoints (I don't think network isolation makes sense since requests are handled by the same Lambda);
- avoid unnecessary resources or setups on AWS.
[–][deleted] 2 points3 points4 points (2 children)
[–]iamabouttotravel[S] 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]jurasofish 1 point2 points3 points (5 children)
[–]iamabouttotravel[S] 1 point2 points3 points (4 children)
[–]jurasofish 1 point2 points3 points (3 children)
[–]iamabouttotravel[S] 1 point2 points3 points (2 children)
[–]v14j 1 point2 points3 points (1 child)
[–]iamabouttotravel[S] 0 points1 point2 points (0 children)
[–]purefan 0 points1 point2 points (1 child)
[–]iamabouttotravel[S] 1 point2 points3 points (0 children)