AWS Solutions Architect – Associate (SAA-C03) · Networking
Security groups vs network ACLs
Two layers of firewall in a VPC: stateful security groups on resources, stateless network ACLs on subnets.
The idea
A VPC has two firewalls:
- A security group wraps a resource (an EC2 instance, an RDS database, a load balancer, a Lambda function in a VPC). It only has allow rules, and it's stateful: if a request is allowed in, the reply is automatically allowed out.
- A network ACL (NACL) guards a whole subnet. It has allow and deny rules, evaluated in number order, and it's stateless: replies must be allowed explicitly in the other direction.
Most of the time you secure things with security groups. NACLs are a coarse extra layer, mainly useful to block specific IP addresses or ranges.
Premium course
Keep reading with a membership
The rest of this lesson, its practice questions and the whole AWS Solutions Architect – Associate (SAA-C03) course are part of the membership.
Reference for this lesson
Free pages on the services and comparisons in this lesson.
- Security groups vs network ACLs · Comparison
- AWS Network Firewall · Service
- Amazon VPC · Service
Open in the app to mark lessons complete, take notes and track your progress.