Bitzu

SAA-C03 ยท Network security in the VPC

Private egress with NAT

Letting private subnets reach the internet with a NAT gateway (placement, Elastic IP, per-AZ design) versus a NAT instance, and the egress-only internet gateway for IPv6.

Key points

  • Public NAT gateway: outbound IPv4 for private subnets; no inbound connections.
  • Zonal: in a public subnet, Elastic IP at creation, private routes send 0.0.0.0/0 to it.
  • Redundant only in its AZ: build one per AZ; a regional NAT gateway spreads across AZs by itself.
  • Managed, 5 to 100 Gbps, no security group.
  • NAT instance: EC2 you patch and size yourself.
  • IPv6 outbound-only: egress-only internet gateway.

Source: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-basics.html

Practice questions

Single choice

Where do you create a public zonal NAT gateway that gives private subnets internet access?

  1. In one of the private subnets it serves
  2. In a public subnet with a route to the internet gateway
  3. Directly attached to the VPC, like an internet gateway
  4. In any subnet, as long as it has a security group
Show answer

Answer: B. In a public subnet with a route to the internet gateway

A public zonal NAT gateway goes in a public subnet, because its own outbound traffic must reach the internet gateway. The private subnets only point their default route at it. It is not attached to the VPC like an internet gateway.

Select all that apply

Which statements about NAT gateways are correct?

  1. You cannot associate a security group with it
  2. It starts at 5 Gbps and scales automatically up to 100 Gbps
  3. A public one needs an Elastic IP address at creation
  4. It accepts inbound connections started from the internet
  5. You must patch its operating system during maintenance windows
Show answer

Answer: A. You cannot associate a security group with it, B. It starts at 5 Gbps and scales automatically up to 100 Gbps, C. A public one needs an Elastic IP address at creation

You cannot attach a security group to a NAT gateway, it scales automatically from 5 Gbps up to 100 Gbps, and a public NAT gateway needs an Elastic IP when it is created. It never accepts unsolicited inbound connections, and as a managed service there is no operating system for you to patch; that burden belongs to a NAT instance.

True or false

Once private subnets route through a NAT gateway, servers on the internet can open connections to instances in those subnets.

Show answer

Answer: False

False. Connections through a NAT gateway must always be started from inside the VPC; the NAT gateway translates the replies back, but it does not accept unsolicited inbound connections. Inbound access needs a public subnet or a load balancer.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More SAA-C03 topics in this module