A company wants to use NAT gateways in its AWS environment. The company's Amazon EC2 instances in private subnets must be able to connect to the public internet through the NAT gateways. Which solution will meet these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Create public NAT gateways in public subnets in the same VPCs as the EC2 instances..
Why this is the answer
The correct solution is to create public NAT gateways in public subnets within the same VPC as the EC2 instances. NAT gateways require a public IP address to route traffic to the internet, which means they must reside in a public subnet. The EC2 instances in private subnets will then route their outbound internet traffic through the NAT gateway. Incorrect options: Creating public NAT gateways in private subnets is incorrect because NAT gateways need to be in a public subnet to access the internet. Creating private NAT gateways is incorrect because private NAT gateways are used for connecting private subnets to other private networks (e.g., on-premises) without traversing the public internet, not for internet access. Creating private NAT gateways in public subnets is incorrect for the same reasons: private NAT gateways are not for internet access, and even if they were, placing them in a public subnet wouldn't change their fundamental purpose.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed