AWS Certified Advanced Networking - Specialty Exam: Troubleshooting NAT Gateway Connectivity

Troubleshooting NAT Gateway Connectivity

Prev Question Next Question

Question

You have created a NAT gateway to ensure that instances in your private subnet can download updates from the internet.

But the instances are still not able to reach the internet even after the gateway has been created.

Which of the following could be one of the underlying issues?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

Options A and C are incorrect because this is relevant when you are creating NAT Instances.

Option B is incorrect since the NAT gateway should be created in the public subnet.

The AWS Documentation mentions the following.

To troubleshoot instances that can't connect to the Internet from a private subnet using a NAT gateway, check the following.

Verify that the destination is reachable by pinging the destination from another source using a public IP address.

Verify that the NAT gateway is in the Available state.

Note: A NAT gateway in the Failed state is automatically deleted after about an hour.

Make sure that you've created your NAT gateway in a public subnet and that the public route table has a default route pointing to an Internet gateway.

Make sure that the private subnet's route table has a default route pointing to the NAT gateway.

Check that you have allowed the required protocols and ports for outbound traffic to the Internet.

For more information on NAT gateways, please refer to the below URL.

https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html

The correct answer is option B: The NAT gateway has been created in the public subnet.

Explanation: To provide internet access to instances in a private subnet, you can create a NAT gateway in a public subnet. The NAT gateway acts as a bridge between the instances in the private subnet and the internet, allowing them to access resources such as software updates and patches.

Option A (The NAT gateway has not been created with the wrong AMI) and Option C (The NAT gateway has been created with the wrong Instance type) are incorrect because the NAT gateway AMI and instance type do not affect the ability of instances in the private subnet to reach the internet. These factors affect only the performance and cost of the NAT gateway.

Option D (The NAT gateway has been created in the private subnet) is incorrect because a NAT gateway must be created in a public subnet. Creating a NAT gateway in a private subnet would not allow instances in the private subnet to access the internet.

Therefore, the most likely reason why instances in the private subnet cannot access the internet is that the NAT gateway was created in the wrong subnet. Make sure that you create the NAT gateway in a public subnet and update the route tables for the private subnet to route traffic through the NAT gateway.