How it works...
Internet access may be required for instances in our private subnets for activities such as patching, downloading software, and so on. NAT allows a private subnet in our VPC to talk to the internet. NAT is a process of remapping the IP address of a packet by modifying its IP header while in transit. AWS provides us with two ways to achieve NAT with VPCs: NAT gateways and NAT instances. We created and configured a NAT gateway in this recipe. Unlike NAT instances, NAT gateways are not associated with any security groups and hence we did not create or configure any security groups.
After creating the NAT gateway, we need to add a route for it within the route table that our private subnets are associated with. We added the route ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access