Reputation: 13
i want to deploy web server on AWS.
but i want to know that Nat GW is necessary
in my diagram,
Public subnet : Application Load Balancer Private Subnet : Web server
in this diagram, access from the Internet will be : IGW -> ALB -> WEB server
but Access from the Web server will be working like this? WEB server -> ALB -> IGW
or WEB server -> NAT GW -> IGW ?
please let me know
Upvotes: 0
Views: 84
Reputation: 238607
Access from the Web server will be working like this? WEB server -> ALB -> IGW or WEB server -> NAT GW -> IGW ?
The NAT gateway/instace is required for your web servers in the private subnet if they will need to access internet. For example, to install some software, install updates or call external api. In this case you need:
WEB server -> NAT GW -> IGW
However, you could pre-install all required software on an instance, construct a custom AMI, and then use the AMI to launch your web-servers. In this case, you may not require internet access at all from your instances. Thus, NAT gateway would not be required.
Upvotes: 1