Skip to content
VirtualLP Virtual Learning Platform
Amazon Web Services AWS-04 advanced

Give a private subnet outbound internet with a NAT gateway

Extend a VPC with a NAT gateway so private instances can download updates while staying unreachable from the internet – a core Solutions Architect pattern.

What you'll do

  • Build public and private subnets
  • Allocate an Elastic IP
  • Deploy a NAT gateway in the public subnet
  • Route private traffic through NAT

Lab tasks

  1. 1 Create VPC app-vpc (172.20.0.0/16)
  2. 2 Create app-public (172.20.1.0/24) and app-private (172.20.10.0/24)
  3. 3 Make app-public a public subnet
  4. 4 Allocate an Elastic IP address
  5. 5 Create NAT gateway app-nat in the public subnet
  6. 6 Create app-private-rt with a default route to the NAT gateway
  7. 7 Associate app-private-rt with app-private