[英]AWS Elasticache/Redis Access Outside of VPC?
I have a lambda I want to run outside of my VPC to avoid NAT costs.我有一个 lambda 我想在我的 VPC 之外运行以避免 NAT 成本。 The only service it needs to access within the VPC is an Elasticache instance.它需要在 VPC 中访问的唯一服务是 Elasticache 实例。 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.我无法在我的 lambda 和 Elasticache 之间创建 VPC 端点,所以我不确定如果不将我的 lambda 放在 VPC 中并通过 NAT,我该如何连接到它。
How can I connect to a redis instance outside of the VPC?如何连接VPC外的redis实例? Bastion server?堡垒服务器?
I think in your cases there are 3 possible solutions:我认为在您的情况下,有 3 种可能的解决方案:
Problem with two lambda functions is the extra delay when invoking another lambda function just for making a cache request.两个 lambda 函数的问题是调用另一个 lambda function 只是为了发出缓存请求时的额外延迟。 Because lambda invoke takes at least an extra 10-20ms, which is much longer than what redis request would take.因为 lambda 调用至少需要额外的 10-20 毫秒,这比 redis 请求花费的时间要长得多。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.