usama3zafar:
Hey folks Do we always have to create a route table that points to our Internet Gateway. Im following Cloud Guru course and here the video instructs to:
• Create an Internet Gateway
• Attach the Internet Gateway to your Custom VPC
• Create another Route table and add a route that has Destination: 0.0.0.0/0 and Target: (Your Custom IGW)
My question is, are AWS Internet Gateways not automatically configured to allow public internet access? Do we always have to create a route table and connect our Internet Gateway with it?
Michael Forrester:
@usama3zafar generically speaking an Internet Gateway is a device on the network that acts as a gateway to the outside of your network…every VPC can have one and only one. But how will the computers know to find it? Which IP address? Which Path does a computer send traffic to get to it?
This is where a route table comes in. The route table usually says to send any traffic (0.0.0.0/0) to the Internet Gateway (IGW). Note that before that it says 10.0.0.0/16 local which means any 10.0.x.x ip addresses are local. Anything that is NOT 10.0.x.x (like 8.8.8.8) should go to the IGW.
There is more to this, but hopefully that answers your question… YES you must have a route to the IGW for the IGW to be used.