What is a security group and how does it differ from a network ACL?
BeginnerConceptNAT, Firewalls & VPN
Answer
A security group is a stateful, allow-only firewall attached to an ENI (instance level). A NACL is a stateless firewall on a subnet with numbered allow and deny rules evaluated in order, first match wins.
Security groups can reference other security groups as sources, which is the main tool for tiered architectures. NACLs are best kept as coarse guardrails, for example to deny a known bad CIDR.
More on NAT, Firewalls & VPN
What is NAT and why is it used?BeginnerWhat is the difference between SNAT, DNAT and PAT?AdvancedHow does an AWS NAT gateway work, and what are its limits?AdvancedWhy is NAT gateway cost a common surprise and how do you reduce it?IntermediateWhat is conntrack and what happens when its table fills up?AdvancedWhat is the difference between a stateful and a stateless firewall?Beginner