Security

Security Groups and Network ACLs

Security groups are stateful allow-only controls on interfaces; network ACLs are stateless subnet filters with allow and deny rules.

How it works

Security groups and network ACLs are two traffic control layers in a VPC. A security group applies at the network interface, is stateful, and supports only allow rules; return traffic for an allowed connection is generally permitted automatically. A network ACL applies at the subnet boundary, is stateless, and evaluates numbered allow or deny rules in order.

When to use it

Choose it when the requirement is instance-aware stateful filtering versus ordered subnet-level stateless rules.

Real-world example

A web service allows HTTPS to its servers with a security group. When a specific IP range must be blocked at the subnet level, an administrator adds an appropriately ordered deny rule to the network ACL and checks traffic in both directions.

Common pitfall

A network ACL does not automatically permit return traffic. For inbound HTTPS connections, allow outbound traffic to the ephemeral ports used by clients and check rule order to avoid accidental blocking.

Often confused with

Compare its service boundary with VPC Endpoints and Transit Gateway; choose from the workload requirement.

References

Prepared by Cloud Quest. Check current behavior and limits in the AWS documentation:

SAA-C03 study guide and learning resources

Understand it for real with 3D models and simulated labs

Connect the concept to a working architecture.

Start learning