Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

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.

Google Cloud Platform icon

Path Info

Clock icon Intermediate
Clock icon 1h 0m
Clock icon May 19, 2023

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. 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
  2. Challenge

    Modify the Private Route Table So 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 =
    Target = NAT Gateway - VPC1NGW
  3. 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:


    Check the returned reponse is the public IP of the VPC1NGW NAT gateway.

    Test connectivity with an Internet webpage using the curl command.

    Example command:-


The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans