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
- Public subnet and private subnet in the same Availability Zone
- 2 public subnets, 2 private subnets, and 1 NAT gateway
- 2 public subnets, 2 private subnets, and 2 NAT gateways
Public Subnet And Private Subnet In The Same Availability Zone
- NAT gateway is launched in the public subnet
- EC2 instance is launched in the private subnet
- An entry of NAT gateway is added in the route table of the private subnet
Pros | Cons |
---|
Less cost | If Availability Zone goes down, there is no backup plan |
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) |
- 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
- Entry of NAT gateway is added in the route table of private-subnet-1 and private-subnet-2
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) |
- 2 NAT gateways are launched in public-subnet-1 and public-subnet-2
- EC2 instance is launched in private-subnet-1
- Another EC2 instance is launched in private-subnet-2
- Entry of NAT gateway 1 is added in the route table of private-subnet-1
- Entry of NAT gateway 2 is added in the route table of private-subnet-2
Click to Enlarge