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




  1. Public subnet and private subnet in the same Availability Zone
  2. 2 public subnets, 2 private subnets, and 1 NAT gateway
  3. 2 public subnets, 2 private subnets, and 2 NAT gateways



Public Subnet And Private Subnet In The Same Availability Zone




  1. NAT gateway is launched in the public subnet
  2. EC2 instance is launched in the private subnet
  3. An entry of NAT gateway is added in the route table of the private subnet
ProsCons
Less costIf Availability Zone goes down, there is no backup plan


Picture showing the representation of scenario Public Subnet And Private Subnet In The Same Availability Zone
Click to Enlarge


2 Public Subnet, 2 Private Subnet, And 1 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)




  1. NAT gateway is launched in public-subnet-1
  2. EC2 instance is launched in private-subnet-1
  3. Another EC2 instance is launched in private-subnet-2
  4. Entry of NAT gateway is added in the route table of private-subnet-1 and private-subnet-2


Picture showing the representation of the scenario 2 Public Subnet, 2 Private Subnet And 1 NAT Gateway
Click to Enlarge


2 Public Subnet, 2 Private Subnet, And 2 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)




  1. 2 NAT gateways are launched in public-subnet-1 and public-subnet-2
  2. EC2 instance is launched in private-subnet-1
  3. Another EC2 instance is launched in private-subnet-2
  4. Entry of NAT gateway 1 is added in the route table of private-subnet-1
  5. Entry of NAT gateway 2 is added in the route table of private-subnet-2


Picture showing the representation of scenario 2 Public Subnet, 2 Private Subnet And 2 NAT Gateways
Click to Enlarge




Posted By  -  Karan Gupta
 
Posted On  -  Friday, July 29, 2022

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250