VPC subnets, routing and gateways: SOA-C03 study notes and practice questions
What to know about VPC subnets, routing and gateways for the SOA-C03 exam, from the Networking and Content Delivery domain (18% of the exam guide), then 2 free questions to test it. Part of the SOA-C03 study guide.
Instances in a private subnet now have IPv6 addresses and must download updates from IPv6 internet repositories.
The security team requires that no host on the internet can start a connection to these instances over IPv6, even if someone later adds a permissive security group rule.
What should a CloudOps engineer add to the private subnet's route table?
Choose one answer.
AA. A ::/0 route to an egress-only internet gateway attached to the VPC.
BB. A ::/0 route to the VPC's internet gateway, with security groups that allow only outbound traffic.
CC. A ::/0 route to a NAT gateway in a public subnet, so that IPv6 traffic is translated to the NAT gateway's address.
DD. A ::/0 route to a gateway VPC endpoint, which keeps the IPv6 update traffic inside the AWS network.
C. Wrong: NAT gateways translate traffic to IPv4 addresses and do not provide outbound-only access for IPv6 to IPv6 traffic. The egress-only internet gateway is the IPv6 equivalent of this pattern. Learn more: NAT gateways (opens in a new tab)
For IPv6, there is no NAT step to hide instances, because every address is public. The egress-only internet gateway fills that role: it is stateful, allows outbound connections and their replies, and drops connections started from outside. Routing ::/0 to it gives private subnets outbound-only IPv6 access.
A dental chain launched a new EC2 instance for a patient-reminder service in a subnet it believes is public.
The instance cannot reach the internet. The security group allows all outbound traffic, the network ACL is the default, and the VPC has an internet gateway attached.
The instance has only a private IPv4 address, and the subnet's route table contains only the local route.
Which TWO actions will give the instance internet access? (Choose two.)
Choose two answers.
AA. Associate an Elastic IP address with the instance so that it has a public IPv4 address.
BB. Add a 0.0.0.0/0 route that targets the internet gateway to the subnet's route table.
CC. Add an inbound rule to the security group that allows all traffic from 0.0.0.0/0.
DD. Turn on DNS hostnames for the VPC so that the instance can resolve and reach public domain names.
EE. Add a 0.0.0.0/0 route that targets a NAT gateway placed in the same subnet as the instance.
Show the answer and explanation
Answers: A, B
A. Right: Correct. Traffic through an internet gateway needs a public IPv4 address on the instance. An Elastic IP address gives it one that stays the same across stops and starts. Learn more: Elastic IP addresses (opens in a new tab)
B. Right: Correct. A subnet is public only when its route table sends internet-bound traffic to an internet gateway. Without the route, traffic has nowhere to go but the local VPC. Learn more: Configure route tables (opens in a new tab)
E. Wrong: A NAT gateway must sit in a public subnet whose route table points at the internet gateway. Placed in this subnet, which has no internet route, it cannot reach the internet itself. Learn more: NAT gateways (opens in a new tab)
Explanation
Internet access through an internet gateway needs both a route and an address. The subnet's route table must send 0.0.0.0/0 to the internet gateway, and the instance needs a public IPv4 address, such as an Elastic IP address. Security group and DNS changes do not fix either missing piece.
Want more on VPC subnets, routing and gateways? The 5 full-length practice sets have 10 more VPC subnets, routing and gateways questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →