简体   繁体   English

如果我不想访问互联网,是否需要 VPC 中的 NAT 网关和路由表?

[英]Do I need NAT gateway and route table in a VPC if I don't want internet access?

I am going to build a Lambda and a RDS aurora for my application.我将为我的应用程序构建一个 Lambda 和一个 RDS aurora。 The RDS aurora needs to be inside a VPC and it doesn't need internet access. RDS aurora 需要位于 VPC 内,并且不需要 Internet 访问。 I have read a lot articles about VPC setup for database and all of them mentioned that need to create VPC, public/private subnets, route table, NAT gateway and internet gateway.我已经阅读了很多关于数据库 VPC 设置的文章,所有文章都提到需要创建 VPC、公共/私有子网、路由表、NAT 网关和 Internet 网关。

However, in my case, I don't need internet access in the database VPC.但是,就我而言,我不需要在数据库 VPC 中访问 Internet。 So my question is do I need NAT gateway and route table at all?所以我的问题是我是否需要 NAT 网关和路由表? I know each VPC has a default route table, is the default route table good enough?我知道每个 VPC 都有一个默认路由表,默认路由表是否足够好? If I just create a VPC with 3 private subnets and attach the VPC to my lambda.如果我只是创建一个带有 3 个私有子网的 VPC 并将 VPC 附加到我的 lambda。 Does it work?它有效吗?

Your understanding is correct and you don't need any NAT.您的理解是正确的,您不需要任何 NAT。

NAT is specifically used for accessing public internet from private subnet, but it doesn't seem to be required here. NAT 专门用于从私有子网访问公共互联网,但这里似乎不需要它。

Just make sure your Lambda doesn't need to access any external entity or AWS Service as well (Like S3).只需确保您的 Lambda 也不需要访问任何外部实体或 AWS 服务(如 S3)。 If you are required to access an AWS Service, you may create a VPC Endpoint for it.如果您需要访问 AWS 服务,您可以为其创建一个VPC 终端节点 (Linked example is for S3) (链接示例适用于 S3)

暂无
暂无

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

相关问题 如何使用 nat 网关限制 VPC 中的 inte.net 访问? - How to restrict internet access in a VPC with a nat gateway? 尽管按照规则配置了 NAT、Internet 网关,AWS VPC 仍无法访问 Internet - AWS VPC can't access Internet despite configuring NAT, Internet Gateway according to rules Cloudformation:没有Internet路由的VPC路由表 - Cloudformation: VPC Routing table with No Route for Internet Gateway 我是否需要 ELB 来访问私有 ECS 容器或 NAT 实例/网关? - Will I need an ELB to access private ECS Containers or a NAT Instance/Gateway? 具有互联网网关和 NAT 的 AWS VPC - AWS VPC with both internet gateway and NAT VPC 中的 AWS Lambda 在 NAT 后面没有互联网访问权限 - AWS Lambda in VPC doesn't have internet access behind NAT 每个专用子网是否需要单独的NAT网关? - Do I need a separate NAT gateway for each private subnet? 如何允许私有子网VPC中的AWS Lambda资源在不使用NAT的情况下与Internet通信? - How do I allow AWS lambda resources in a private subnet VPC to communicate with the internet without using a NAT? 我无法从 VPC 内部访问 AWS API 网关 - I can't access an AWS API Gateway from inside a VPC 从 Lambda(无 VPC)调用 Lambda(VPC 内部)。如果 VPC 中没有连接互联网网关,我会收到来自 Lambda(VPC 内部)的响应吗? - Invoke Lambda (inside VPC) from Lambda(No VPC).Will I get a response from the Lambda(Inside VPC) if I do not have Internet Gateway attached in the VPC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM