Q85 — AWS SAA-C03 Ch.11

Question 85 of 100 | ← Chapter 11

Q785. 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?

Correct Answer: C. Create public NAT gateways in public subnets in the same VPCs as the EC2 instances.

Explanation

To meet the requirement of allowing Amazon EC2 instances in private subnets to connect to the public internet through NAT gateways, the solution is:C. Create public NAT gateways in public subnets in the same VPCs as the EC2 instances.NAT gateways are used to allow instances in private subnets to access the internet while hiding their private IP addresses. To enable EC2 instances in private subnets to connect to the public internet, you need to deploy public NAT gateways in the VPC.Here's why the other options are not the correct choices:A. Creating public NAT gateways in the same private subnets as the EC2 instances: This option is incorrect because NAT gateways need to be associated with public subnets, not private subnets. Placing them in private subnets would prevent the instances from accessing the public internet.B. Creating private NAT gateways in the same private subnets as the EC2 instances: Private NAT gateways are not designed to provide internet access for instances in private subnets. They are used for scenarios where outbound internet access is not required, such as instances communicating with other services within the VPC or on-premises.D. Creating private NAT gateways in public subnets in the same VPCs as the EC2 instances: Similar to option B, private NAT gateways are not suitable for providing internet access to instances in private subnets. Placing them in public subnets would not fulfill the requirement of allowing EC2 instances in private subnets to connect to the public internet.Therefore, the correct solution to meet the requirement is:C. Create public NAT gateways in public subnets in the same VPCs as the EC2 instances.