Network Security

AWS Shield & WAFnetworkedge DDoS protection and layer-7 request filtering. VPC Security Groups & NACLsnetworkthe two packet filters inside a VPC and how they interact.

Perimeter and VPC controls: Shield and WAF, security groups and network ACLs.

AWS network security is layered: no single control is expected to stop every attack. Traffic from the internet meets DDoS protection and a web application firewall at the edge, then subnet-level and instance-level packet filters inside the VPC. Knowing which layer owns which decision avoids both gaps and duplicated, conflicting rules.

AWS Shield & WAF

AWS Shield and AWS WAF together form the edge defence for internet-facing AWS workloads. Shield protects against L3 / L4 (network and transport) DDoS…

VPC Security Groups & NACLs

VPC Security Groups (SGs) and Network ACLs (NACLs) are the two packet-filtering primitives that AWS provides inside a VPC. They sit at different boundaries…

1. How the layers fit together

Layered Network Controls, Outside In Shield L3/L4 DDoS WAF L7 rules Load balancer public subnet NACL subnet, stateless Security group ENI, stateful Instance app Each layer filters a different property of the traffic; a request must pass all of them.

AWS Shield Standard is on by default for every account and absorbs common volumetric and protocol attacks at the network and transport layers; Shield Advanced adds response-team support and cost protection. AWS WAF inspects HTTP requests at CloudFront, an Application Load Balancer or API Gateway and applies rules such as rate limits, IP sets, managed rule groups and SQL-injection or XSS matching. Inside the VPC, network ACLs filter packets at the subnet boundary with ordered allow and deny rules, and security groups filter at each network interface with allow-only rules that track connection state.

2. Which control for which job

GoalUseNotes
Absorb volumetric DDoSShieldStandard is automatic; Advanced for critical apps
Block bad HTTP patterns or rate-limit clientsWAFAttach to CloudFront, ALB or API Gateway
Allow app tier to reach database tierSecurity groupReference the source SG instead of CIDRs
Explicitly deny a CIDR for a whole subnetNACLOnly NACLs support deny rules
Default posture for new resourcesSecurity groupDeny-all inbound until a rule allows it

In practice most teams keep NACLs close to the default allow-all and express intent in security groups, because stateful rules are easier to reason about. NACLs are reserved for coarse subnet isolation or emergency blocks. Remember that NACLs are stateless, so a rule allowing inbound traffic needs a matching outbound rule for the ephemeral return ports.

Network controls work together with identity: see Identity & Secrets for IAM and key management, and Detection for finding traffic that got through. Host-level filtering on a single server is covered under Fail2Ban.