Articles → AWS → Different Ways Of Configuring NAT Gateways In AWS
Different Ways Of Configuring NAT Gateways In AWS
NAT Gateway
Different Configurations Of NAT Gateway
- A public and private subnet in the same Availability Zone.
- Two public subnets, two private subnets, and one NAT gateway.
- Two public subnets, Two private subnets, and Two NAT gateways.
A Public Subnet And Private Subnet In The Same Availability Zone
- The NAT gateway is launched in the public subnet.
- An EC2 instance is launched in the private subnet.
- An entry of the NAT gateway is added in the private subnet's route table.
Pros | Cons |
---|
Less cost | If the Availability Zone goes down, there is no backup plan. |
Click to Enlarge
Two Public Subnets, Two Private Subnets, And One NAT Gateway
Availability Zone (AZ1) | Availability Zone (AZ2) |
---|
Private subnet (private-subnet-1) | Private subnet (private-subnet-2) |
Public subnet (public-subnet-1) | Public subnet (public-subnet-2) |
- NAT gateway is launched in public-subnet-1.
- EC2 instance is launched in private-subnet-1.
- Another EC2 instance is launched in private-subnet-2.
- The entry of the NAT gateway is added in the route table of private-subnet-1 and private-subnet-2.
Click to Enlarge
Two Public Subnets, Two Private Subnets, And Two NAT Gateways
Availability Zone (AZ1) | Availability Zone (AZ2) |
---|
Private subnet (private-subnet-1) | Private subnet (private-subnet-2) |
Public subnet (public-subnet-1) | Public subnet (public-subnet-2) |
- Two NAT gateways are launched in public-subnet-1 and public-subnet-2.
- EC2 instance is launched in private-subnet-1.
- Another EC2 instance has been launched in private-subnet-2.
- The entry for NAT gateway 1 has been added to the route table of private-subnet-1.
- The entry for NAT gateway 2 has been added to the route table of private-subnet-2.
Click to Enlarge
Posted By - | Karan Gupta |
|
Posted On - | Friday, July 29, 2022 |