CLF-C02 Practice Question 58: Private Subnet Internet Access
AWS Certified Cloud Practitioner (CLF-C02) · Test 6 · question 8 of 10
Application servers run in a private subnet and have no public IP addresses. They need to download operating system security patches from the internet, but nothing on the internet may be able to start a connection to them. What should a solutions team add?
Show answer and explanation
Answer:
A NAT gateway lets instances in a private subnet connect to services outside the VPC, while external services cannot start a connection with those instances. A public NAT gateway is created in a public subnet with an Elastic IP address. The private subnet's route table sends internet-bound traffic to the NAT gateway, which forwards it through the VPC's internet gateway. Connections always have to start from inside the VPC, which is exactly the one-way access the stem asks for.
Option A does not work on its own: instances with no public IP address cannot use an internet gateway directly, and giving them public IPs would turn this into a public subnet, reachable from the internet. Option B has the same problem. Elastic IP addresses make each server publicly addressable, so inbound connections would depend entirely on security group rules. Option C is a private connection to specific AWS services only: gateway endpoints support Amazon S3 and Amazon DynamoDB, not arbitrary sites on the internet such as OS patch repositories.
Reference: NAT gateways