You have a VPC with public and private subnets. You want instances in the private subnet to access the internet securely. Which architecture correctly enables this?
Remember, NAT Gateways must be in public subnets to route traffic for private subnets.
A NAT Gateway must be placed in a public subnet with a route to the internet gateway. Private subnets then route their internet-bound traffic to the NAT Gateway, enabling outbound internet access without exposing private instances directly.
You have a NAT Gateway in a public subnet. What is the correct route table entry for the private subnet to allow internet access through the NAT Gateway?
Routes use destination CIDR blocks and targets like gateways or instances.
The private subnet's route table must have a route for all internet traffic (0.0.0.0/0) pointing to the NAT Gateway ID to enable outbound internet access.
Instances in a private subnet use a NAT Gateway for internet access. Which security group rule is necessary to allow outbound internet traffic?
Think about what outbound traffic the instance needs to send to reach the internet.
Instances must have outbound rules allowing traffic to the internet (0.0.0.0/0) on required ports. The NAT Gateway handles inbound return traffic, so inbound rules can be restrictive.
You delete the NAT Gateway used by private subnet instances for internet access. What happens to the instances' internet connectivity?
Consider how routing depends on the NAT Gateway's presence.
Deleting the NAT Gateway breaks the route for private subnet instances to reach the internet, causing immediate loss of internet connectivity until the route is updated or a new NAT Gateway is created.
You want to design a VPC with private subnets in multiple Availability Zones (AZs) and ensure high availability for internet access via NAT Gateway. What is the best practice?
Think about fault tolerance and AZ isolation.
For high availability, create a NAT Gateway in each AZ's public subnet. Route private subnets in each AZ to their local NAT Gateway to avoid cross-AZ traffic and single points of failure.