SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Security and Compliance

AWS Security Components: Security Groups vs Network ACLs, WAF, Trusted Advisor

20 min readCLF-C02 · Security and ComplianceUpdated

AWS security components are the features and services that decide what traffic may reach your resources and that flag weaknesses in how your account is set up. CLF-C02 expects you to know what each one does and where it sits. The most-tested comparison is security group vs network ACL: one is a stateful firewall at the instance level, the other a stateless filter at the subnet level. Above them, AWS WAF inspects HTTP(S) requests at layer 7 to block attacks such as SQL injection and cross-site scripting, AWS Shield absorbs DDoS attacks, AWS Network Firewall inspects all traffic flowing through a VPC, and AWS Firewall Manager applies these protections centrally across every account in an organization. When AWS-native tools are not enough, AWS Marketplace offers third-party security products. For guidance, AWS publishes the AWS Knowledge Center, the AWS Security Center and the AWS Security Blog, and AWS Trusted Advisor checks your account for risky configurations. This lesson covers each component: what it is, what layer it protects, and how to tell it apart from its neighbours.

What you’ll learn

  • Compare security groups and network ACLs across scope, statefulness, rule types, evaluation order, and starting state
  • Explain why a stateless network ACL needs rules for the ephemeral port range and how rule numbering decides whether a deny takes effect
  • Describe what AWS WAF protects against and which resources a web ACL can attach to
  • Distinguish AWS Shield Standard from Shield Advanced, and AWS Shield from AWS WAF
  • Explain what AWS Firewall Manager and AWS Network Firewall add beyond security groups and network ACLs
  • Identify AWS Marketplace as the source for third-party security products and name common categories
  • Locate AWS security information in the AWS Knowledge Center, AWS Security Center, and AWS Security Blog
  • Explain how AWS Trusted Advisor security checks identify issues, and what Basic Support includes compared with higher support plans

The 9 parts · about 13 min of reading

  1. Where each AWS security component sitsStart hereNACLs guard subnets, security groups guard instances, WAF reads web requests, Shield absorbs DDoS and Firewall Manager spans accounts.1 min
  2. Security groupsSecurity groups are stateful, allow-only firewalls on each network interface that can reference other groups and change instantly.1 min
  3. Network ACLsNetwork ACLs are stateless subnet filters with numbered allow and deny rules, first match wins, so return traffic needs ephemeral ports.2 min
  4. Security group vs network ACLSix attributes separate the two firewalls: level, state, rule types, evaluation order, starting state and which resources they cover.1 min
  5. AWS WAF: protecting web applications at layer 7AWS WAF inspects HTTP request content to block SQL injection and XSS through web ACLs on CloudFront, ALB and API Gateway.1 min
  6. AWS Shield, AWS Firewall Manager and AWS Network FirewallShield absorbs DDoS floods, Network Firewall inspects and filters VPC traffic, and Firewall Manager applies rules across an organization.3 min
  7. Third-party security products on AWS MarketplaceAWS Marketplace sells third-party firewalls, SIEM and endpoint tools from vendors, with free trials or pay-as-you-go on your AWS bill.1 min
  8. Where to find AWS security informationKnowledge Center gives quick answers, Security Center holds whitepapers and bulletins, and the Security Blog announces new features.1 min
  9. AWS Trusted AdvisorTrusted Advisor flags open security groups, public S3 buckets and missing root MFA; the full check set needs Business Support+ or higher.2 min

Mind map

NACL at the subnet, SG at the instanceWAF inspects requests at layer 7GuardDuty detects threats, not afirewall1✓Layers of protectionStateful: return traffic allowedAllow rules onlyNew group: no inbound, all outboundSource can be another security group2✓Security groupsStateless: allow ephemeral portsAllow and deny rulesLowest number first; first match winsDefault allows all; custom denies all3✓Network ACLsBlock an IP range: NACLOne instance only: security groupComplementary; traffic must pass both4✓SG vs NACLBlocks SQL injection and XSSWeb ACL on CloudFront, ALB, APIGatewayCan match a request's country5✓AWS WAFShield Standard: free layer 3/4 DDoSAdvanced: SRT and cost protectionNetwork Firewall: IPS and domainfilteringFirewall Manager: rules acrossaccounts6✓Shield, Network Firewall,FMSThird-party firewalls, SIEM, endpointCharges appear on your AWS bill7✓AWS MarketplaceKnowledge Center on re:Post: quickanswersSecurity Center: whitepapers,bulletinsSecurity Blog: new featureannouncements8✓Security informationFlags open SGs, public S3, no root MFAFull checks: Business Support+ orhigherConfig checker, not threat detection9✓Trusted AdvisorAWS network securitycomponents
Mind map

AWS Security Components: Security Groups vs Network ACLs, WAF, Trusted Advisor

NACL at the subnet, SG at the instanceWAF inspects requests at layer 7GuardDuty detects threats, not afirewall1✓Layers of protectionStateful: return traffic allowedAllow rules onlyNew group: no inbound, all outboundSource can be another security group2✓Security groupsStateless: allow ephemeral portsAllow and deny rulesLowest number first; first match winsDefault allows all; custom denies all3✓Network ACLsBlock an IP range: NACLOne instance only: security groupComplementary; traffic must pass both4✓SG vs NACLBlocks SQL injection and XSSWeb ACL on CloudFront, ALB, APIGatewayCan match a request's country5✓AWS WAFShield Standard: free layer 3/4 DDoSAdvanced: SRT and cost protectionNetwork Firewall: IPS and domainfilteringFirewall Manager: rules acrossaccounts6✓Shield, Network Firewall,FMSThird-party firewalls, SIEM, endpointCharges appear on your AWS bill7✓AWS MarketplaceKnowledge Center on re:Post: quickanswersSecurity Center: whitepapers,bulletinsSecurity Blog: new featureannouncements8✓Security informationFlags open SGs, public S3, no root MFAFull checks: Business Support+ orhigherConfig checker, not threat detection9✓Trusted AdvisorAWS network securitycomponents

How the exam tests this

CLF-C02 tests this task mostly through the security group vs network ACL comparison: items quote one attribute (stateful vs stateless, instance vs subnet level, allow-only vs allow-and-deny, all-rules vs numbered first-match evaluation, starting states) and ask which component it describes, or set scenarios that turn on how network ACL rules are evaluated and how stateless filtering treats return traffic. AWS WAF appears when requests must be filtered by content (SQL injection, cross-site scripting) on CloudFront, ALB or API Gateway; AWS Shield when the threat is a DDoS attack, including what Shield Advanced adds over Standard; AWS Firewall Manager when the same protections must reach every account in an organization; and AWS Network Firewall when VPC traffic needs intrusion prevention or domain filtering. Trusted Advisor questions cover which configuration issues its security checks flag and what Basic Support includes compared with Business Support+, Enterprise Support and Unified Operations. Matching items pair a need with a resource: quick answers with the AWS Knowledge Center, whitepapers and security bulletins with the AWS Security Center, feature announcements with the AWS Security Blog, and third-party security products with AWS Marketplace.

Key takeaways

  1. Security groups are stateful instance-level firewalls with allow rules only; all rules are evaluated together.
  2. Network ACLs are stateless subnet-level filters with allow AND deny rules, evaluated in number order, first match wins.
  3. Because NACLs are stateless, responses go to the client's ephemeral port, so the return-direction rule must allow the ephemeral port range, not the service port.
  4. A NACL deny only takes effect if it is numbered lower than any allow rule that also matches.
  5. Starting states: default NACL allows all; custom NACL denies all; new security group denies inbound and allows outbound.
  6. AWS WAF blocks SQL injection and XSS at layer 7 on CloudFront, ALB or API Gateway; AWS Shield stops DDoS (Standard automatic at no extra cost, Advanced paid with the Shield Response Team and cost protection).
  7. AWS Firewall Manager applies WAF, Shield Advanced, security group, NACL, Network Firewall and DNS Firewall policies across an organization, including new accounts; AWS Network Firewall is a managed stateful VPC firewall with intrusion prevention and domain filtering.
  8. Third-party security products come from AWS Marketplace, billed through your AWS bill. Quick answers → Knowledge Center; whitepapers and bulletins → Security Center; announcements → Security Blog. Trusted Advisor flags open security groups, public S3 buckets and snapshots, and missing root MFA; Basic Support gets selected security checks, the full set needs Business Support+, Enterprise Support or Unified Operations.
0/9
Ready to start

Part 1: Where each AWS security component sits

NACLs guard subnets, security groups guard instances, WAF reads web requests, Shield absorbs DDoS and Firewall Manager spans accounts.

1 min read · 9 parts, about 13 min in allStart lesson

Frequently asked questions

What is the difference between a security group and a network ACL in AWS?

A security group is a stateful virtual firewall at the instance (network interface) level: it supports allow rules only, evaluates all rules before deciding, and automatically permits return traffic for allowed connections. A network ACL is a stateless filter at the subnet level: it supports both allow and deny rules, processes them in number order applying the first match, and requires explicit rules for return traffic. Traffic entering a subnet must pass the network ACL first, then the security group of the target instance. Use security groups for fine-grained per-resource control and network ACLs as a subnet-wide guardrail or to explicitly block IP ranges.

Is a security group stateful or stateless?

Security groups are stateful. When a security group allows a connection in one direction, the response traffic for that connection is automatically allowed in the other direction — you never write rules for return traffic. This is the opposite of network ACLs, which are stateless: they evaluate every packet independently, so return traffic must be explicitly permitted by outbound rules, typically covering the ephemeral port range. Because the response goes to the client's ephemeral port, a network ACL's return-direction rule must allow that port range rather than the service port.

What does AWS WAF protect against?

AWS WAF protects web applications against attacks carried inside HTTP and HTTPS requests — layer 7 of the OSI model. The two examples to know are SQL injection, where malicious database commands are hidden in request parameters, and cross-site scripting (XSS), where attackers inject scripts into pages served to other users. You define rules in a web ACL that allow, block, or count matching requests, and can add AWS managed rule groups for common threats. The web ACL attaches to Amazon CloudFront, an Application Load Balancer, or Amazon API Gateway, filtering requests before they reach your application.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?