Which solution will increase the network resiliency of this architecture?
Add two NAT gateways so that each Availability Zone has a NAT gateway. Configure a route table for each private subnet to send traffic to the NAT gateway in the subnet’s Availability Zone.
Add two NAT gateways so that each Availability Zone has a NAT gateway. Configure a route table for each public subnet to send traffic to the NAT gateway in the subnet’s Availability Zone.
Add two internet gateways so that each Availability Zone has an internet gateway. Configure a route table for each private subnet to send traffic to the internet gateway in the subnet’s Availability Zone.
Add two internet gateways so that each Availability Zone has an internet gateway. Configure a route table for each public subnet to send traffic to the internet gateway in the subnet’s Availability Zone.
Explanations:
Adding two NAT gateways, one in each Availability Zone, increases the resiliency of the architecture. Each private subnet can route traffic to its corresponding NAT gateway, ensuring that if one NAT gateway fails, the others remain available, allowing the EC2 instances in the private subnets to maintain internet connectivity.
While adding two NAT gateways is correct, configuring the route table for the public subnets to send traffic to the NAT gateway is not appropriate. Public subnets should route traffic through the internet gateway, not the NAT gateway, as NAT gateways are used for private subnets to access the internet.
AWS does not allow multiple internet gateways to be attached to a single VPC. Each VPC can have only one internet gateway. Therefore, adding two internet gateways is not a feasible solution, and configuring private subnets to route traffic through an internet gateway is incorrect since private subnets should use NAT gateways for internet access.
Similar to option C, AWS allows only one internet gateway per VPC. Thus, adding two internet gateways is not possible. Public subnets should route through the internet gateway, but since the premise is flawed, the overall solution cannot increase resiliency for the private subnets requiring internet access.