In modern cloud architecture, security best practices recommend placing application workloads (such as backend services and database instances) inside Private Subnets. This ensures that they cannot be directly reached or targeted from the public internet.
However, backend services and container tasks still require outbound internet access in order to:
A NAT Gateway (Network Address Translation Gateway) solves this challenge: it allows instances and containers in private subnets to send outbound traffic to the internet, while strictly preventing external internet users from initiating inbound connections to those private resources.
In this section, we will:
What is an Elastic IP (EIP)?
An Elastic IP address is a static, public IPv4 address allocated to your AWS account. A public NAT Gateway requires a dedicated Elastic IP so that outbound packets from your private subnets have a consistent, valid public IP address when communicating across the internet.
Before creating a public NAT Gateway, you must allocate a public IPv4 address (Elastic IP) from Amazon’s pool.

Name and Value to FCAJ-Lab-IP to keep your resources easily identifiable.
Now that you have an allocated Elastic IP, you can proceed to create the NAT Gateway.

fcaj-nat.
A public NAT Gateway must always be placed in a Public Subnet (a subnet whose route table directs 0.0.0.0/0 traffic to an Internet Gateway). If you accidentally place the NAT Gateway in a private subnet, it cannot reach the internet, and your private subnet resources will remain unable to connect
After clicking Create NAT gateway, you will be taken to the NAT Gateway details page.

Please be patient and wait until the NAT Gateway status displays Available before continuing to the next section (Route Table configuration). Attempting to route traffic through a gateway that is still in the Pending state will result in connection drops.
In production environments, it is best practice to deploy one NAT Gateway per Availability Zone (Multi-AZ) to achieve fault tolerance. However, for workshop scenarios, a single NAT Gateway shared across private subnets is ideal to avoid redundant hourly charges.
NAT Gateways are billed on an hourly basis (approx. $0.045/hour in us-east-1) in addition to data processing fees per gigabyte. Unattached Elastic IPs also incur a small hourly fee if they are allocated but not associated with an active resource. Remember: When you finish the entire workshop, make sure to delete the NAT Gateway and release the allocated Elastic IP to avoid unexpected AWS charges.