How do NACLs fit in when you already have security groups?
IntermediateProductionVPC & Network Architecture
Answer
Treat NACLs as a coarse, stateless backstop at the subnet boundary: deny known bad CIDRs, block ports that should never be used, isolate the data subnets from the internet. Do not duplicate fine-grained allow lists there.
Because they are stateless you must allow ephemeral ports 1024–65535 for responses, and rules are evaluated by number, lowest first; a deny placed after a broad allow never fires.
More on VPC & Network Architecture
How would you design a production VPC for a three-tier web application?IntermediateHow many AZs and subnets should a production VPC use, and why?BeginnerWhat makes a subnet public versus private?BeginnerHow do you avoid NAT gateway single points of failure and cross-AZ charges?IntermediateWhen should you use VPC endpoints?IntermediateHow do you design connectivity for 50+ VPCs across accounts and regions?Advanced