AWS:两个 AZ 中的两个私有子网可以共享同一个 NAT 网关吗?

AWS: Can two private subnets in two AZs share the same NAT gateway?

我在一个可用区中有一个私有子网和一个 public 子网,在另一个可用区中有两个相同的子网。

我可以在一个 public 子网中创建一个 NAT 网关,并为两个私有子网创建两个路由表,它们都指向这个单个 NAT 网关吗?

或者我是否必须创建两个 NAT 网关,每个 AZ 一个?

是的,您可以拥有一个 NAT 网关。但是为了高可用性,最好每个 AZ 有一个 NAT 网关。

文档阐明了 this

If you have resources in multiple Availability Zones and they share one NAT gateway, in the event that the NAT gateway’s Availability Zone is down, resources in the other Availability Zones lose internet access.