I have a lambda I want to run outside of my VPC to avoid NAT costs. The only service it needs to access within the VPC is an Elasticache instance. I can’t create a VPC Endpoint between my lambda and Elasticache, so I’m not sure how I can connect to it without putting my lambda within the VPC and going through NAT.
How can I connect to a redis instance outside of the VPC? Bastion server?
2
Answers
I think in your cases there are 3 possible solutions:
Problem with two lambda functions is the extra delay when invoking another lambda function just for making a cache request. Because lambda invoke takes at least an extra 10-20ms, which is much longer than what redis request would take.