Difficulty Level: 1
Creation Date: June 9, 2020
Original Author(s): Thyago Mota
Contributor(s): João Marcelo
This lab illustrates how an EC2 instance running in a private subnet can be configured to access the internet with the help of a service called Nat gateway.
In order to achieve the goal of this lab, you will have to go through the following steps:
Repeat all of the steps described in lab-002, making sure that any reference to lab-002 are replaced by lab-003.
Create a NAT gateway in the public subnet. Note that an elastic public IP must be allocated before a NAT gateway can be created.
Create a new route table with the Name tag private and with a default route to the NAT gateway created in step 2.
Associate the newly created route table to the private subnet.
To validate this lab you need to access the EC2 instance in the private subnet (labeled as B) and from there try to access the internet, for example:
curl www.google.com