- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Deploying Network Address Translation (NAT) Gateway
In this lab, you will be deploying a NAT gateway into the public-facing subnet of the solution. Once implemented, you will test connectivity using an EC2 instance. NAT gateways allow communication to the internet without the sending device requiring a public IP address. Not having a public IP address prevents any communication from the internet into the endpoint. It is expected you will be familiar with the AWS console to complete this lab and have an understanding of networks and routing.

Lab Info
Table of Contents
-
Challenge
Create a NAT Gateway in the Public Subnet
In this objective, we will be deploying a NAT gateway called VPC1NGW in the public subnet of our VPC.
Use the following settings for this objective:
Name = VPC1NGW Subnet = FirstVPCPublic1UsEast1a-10-0-0-0-24 Connectivity type = Public Elastic IP allocation ID = Allocate Elastic IP
-
Challenge
Modify the Private Route Table So 0.0.0.0/0 Targets the NAT Gateway
In this objective, we will be adding a new route to the private route table, so all traffic not destined for the VPC is sent out to the NAT gateway.
Use the following settings for this objective:
Destination = 0.0.0.0/0 Target = NAT Gateway - VPC1NGW
-
Challenge
Test Internet Connectivity from the Private Instance
Now that the NAT gateway has been created and the route table updated, in this objective you will be confirming connectivity to the internet.
Using AWS System Manager - Fleet Manager, open a session to EC2Instance1.
Use the command below to check the IP address EC2Instance1 is using for internet communication:
curl ifconfig.me
Check the returned response is the public IP of the VPC1NGW NAT gateway.
Test connectivity with an Internet webpage using the
curl
command.Example command:-
curl https://www.bbc.co.uk
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.