简体   繁体   English

我们可以将私有 su.net lambda 连接到公共 su.net 中的资源吗?

[英]Can we connect private subnet lambda to resources in public subnet?

I am connecting different AWS sources (RDS, Elasticache, EFS) in my lambda function. My AWS resources are configured in public su.nets including my Lambda function. My Lambda also needs to access the inte.net but when we configure the lambda function in a public su.net typically it can't get access to the inte.net. I am connecting different AWS sources (RDS, Elasticache, EFS) in my lambda function. My AWS resources are configured in public su.nets including my Lambda function. My Lambda also needs to access the inte.net but when we configure the lambda function在公共 su.net 中,它通常无法访问 inte.net。

Now I am thinking to shift my lambda function to a private su.net so, it can access the inte.net using a NAT gateway.现在我正在考虑将我的 lambda function 转移到私有 su.net,这样它就可以使用 NAT 网关访问 inte.net。 My only concern is, would our lambda function (in the private su.net) be able to access other AWS resources (RDS, Elastichche, EFS) that are in the public su.net?我唯一担心的是,我们的 lambda function(在私有 su.net 中)是否能够访问公共 su.net 中的其他 AWS 资源(RDS、Elastichche、EFS)?

Or there is any other good approach that suits my scenario?或者还有其他适合我的场景的好方法吗? One more thing, I can't move my (RDS, Elasticache, and EFS) to a private su.net.还有一件事,我无法将我的(RDS、Elasticache 和 EFS)移动到私有 su.net。

would our lambda function (in the private su.net) be able to access other AWS resources (RDS, Elastichche, EFS) that are in the public su.net?我们的 lambda function(在私有 su.net 中)是否能够访问公共 su.net 中的其他 AWS 资源(RDS、Elastichche、EFS)?

Yes, if they are in the save VPC.是的,如果它们在保存 VPC 中。 So that's how it is usually done.这就是通常的做法。 Lambda in a private vpc able to connect inte.net through NAT.私有 vpc 中的 Lambda 能够通过 NAT 连接 inte.net。 Since other resources are in the save VPC (or peered), lambda will use private IP addresses to connect to them.由于其他资源位于保存 VPC(或对等)中,lambda 将使用私有 IP 地址连接到它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM