[英]AWS Lambda potential alternatives to connect to RDS in VPC
I am using a lambda function in a VPC to connect to an RDS instance in the same VPC. 我在VPC中使用Lambda函数连接到同一VPC中的RDS实例。 I am considering removing the lambda from the VPC to massively reduce the cold-start time but I want to keep my RDS instance in the VPC. 我正在考虑从VPC中删除lambda,以大大减少冷启动时间,但我想将RDS实例保留在VPC中。
Can anyone foresee major problems with making the lambda function use an SSH tunnel to connect to a bastion instance within the VPC and subsequently to the RDS instance? 任何人都可以预见到使lambda函数使用SSH隧道连接到VPC内的堡垒实例以及随后的RDS实例的主要问题吗? Or something similar with a VPN? 还是类似VPN?
There will obviously be some over-head as the traffic has an extra 'jump' so to speak, but would it be significant enough to make this approach non-feasible? 可以这么说,因为流量有一个额外的“跳跃”,显然会有一些开销,但是是否足以使这种方法不可行呢? Or is the only current approach to keep the Lambda in the same VPC and try to keep and few invocations running? 还是当前唯一的方法是将Lambda保持在同一VPC中并尝试保持少量调用运行?
I also pay for a NAT gateway so my Lambda in a VPC can access the internet. 我还为NAT网关付费,这样我在VPC中的Lambda可以访问互联网。 If I can get it out of the VPC by using an SSH tunnel to connect to the RDS instance it will also simplify my architecture here & reduce my operating costs. 如果我可以通过使用SSH隧道连接到RDS实例将其从VPC中删除,那么这还将简化我的体系结构并降低我的运营成本。
Cold starts because of Lambda's in VPC are a big issue, especially when you want to use a relational database. 由于VPC中存在Lambda,冷启动是一个大问题,尤其是当您要使用关系数据库时。 Luckily, AWS has acknowledged this issue and there is hope on the horizon; 幸运的是,AWS已经意识到了这个问题,并且希望很快就会出现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.