You have two subnets: Subnet A (10.0.1.0/24) and Subnet B (10.0.2.0/24). You want instances in Subnet A to access the internet via a NAT gateway in Subnet B, but Subnet B should not have direct internet access. How should you configure the route tables?
AAssociate Subnet A's route table with 0.0.0.0/0 to the NAT gateway; Subnet B's route table with no route to internet gateway
BAssociate Subnet A's route table with 0.0.0.0/0 to the internet gateway; Subnet B's route table with 0.0.0.0/0 to the NAT gateway
CAssociate both subnets' route tables with 0.0.0.0/0 to the internet gateway
DAssociate Subnet A's route table with a route 0.0.0.0/0 to the NAT gateway; Subnet B's route table with 0.0.0.0/0 to the internet gateway
Step-by-Step Solution
Solution:
Step 1: Understand NAT gateway purpose
NAT gateway allows instances in private subnet (Subnet A) to access internet outbound.