Arkinu
AWS service comparison

AWS Shield vs AWS WAF: differences and when to use each

AWS Shield
AWS WAF

Often confused on the examQuestions tend to offer one as a distractor for the other: look for the phrase in the scenario that tips the balance.

Security, Identity, and Compliance

AWS Shield

Protection against distributed denial of service (DDoS) attacks. Applications on AWS automatically receive protection against common volumetric attacks at no additional cost, and AWS Shield Advanced adds detection, mitigation, and response capabilities for critical applications.

Exam phrases that point here

  • «DDoS protection at no additional cost»

    AWS Shield Standard is automatically enabled for all customers and protects against the most common infrastructure attacks, with nothing to configure.

    When not: Shield Standard does not cover application layer attacks such as HTTP floods: for that you need AWS WAF. And if the ask is for a response team or cost protection, it is Shield Advanced.

  • «SYN or UDP flood attacks against the application»

    These are layer 3/4 attacks, exactly what Shield Standard detects and mitigates automatically.

    When not: If the attack is many valid HTTP requests (layer 7), the hint points to AWS WAF, for example with a rate-based rule.

  • «24/7 access to a DDoS response team»

    With Shield Advanced you can turn to the Shield Response Team (SRT) during an attack.

    When not: The SRT also requires a Business or Enterprise support plan. If the scenario does not ask for expert help or extra guarantees, Shield Standard with WAF is usually enough and is cheaper.

  • «avoid unexpected charges from scaling caused by a DDoS attack»

    Shield Advanced cost protection lets you request credits for the extra usage that an attack caused on the protected resources.

    When not: If the problem is controlling spend in general, unrelated to an attack, the answer lies with AWS Budgets or Cost Explorer.

  • «near real-time visibility and notifications of DDoS attacks»

    Shield Advanced publishes DDoS event metrics in CloudWatch, keeps the attack history, and provides access to a global threat dashboard.

    When not: If the ask is to detect malicious activity in the account (compromised instances, suspicious API calls), the service is Amazon GuardDuty, not Shield.

Often paired with

  • Amazon CloudFront
  • Amazon Route 53
  • Elastic Load Balancing (ELB)
Study AWS Shield →

Security, Identity, and Compliance

AWS WAF

Web application firewall that inspects HTTP(S) requests sent to resources such as Amazon CloudFront, Application Load Balancer, Amazon API Gateway, or Amazon Cognito user pools. Based on rules you define, such as the source IP address or query string values, it allows or blocks the request.

Exam phrases that point here

  • «protect the web application against SQL injection and cross-site scripting»

    AWS WAF inspects the HTTP(S) requests that arrive at, among others, CloudFront, an ALB, API Gateway, or AppSync, and blocks common attack patterns, often with managed rules.

    When not: If the attack is a layer 3/4 network flood (for example, a SYN flood), the protection comes from AWS Shield. And if you need to filter non-HTTP traffic inside a VPC, AWS Network Firewall or security groups fit.

  • «limit the number of requests per IP address»

    A rate-based rule counts the requests from each IP over a time window and applies an action to those that exceed the limit.

    When not: If the ask is to limit the calls of each API client according to their plan, that is solved with Amazon API Gateway throttling and usage plans, not with WAF.

  • «block requests that come from certain countries»

    WAF can filter by the country of origin of the IP (geographic match) and combine it with other conditions.

    When not: If it is enough to block countries for all the content of a distribution, CloudFront geographic restriction also solves it without a web ACL.

  • «block malicious IP addresses before they reach the Application Load Balancer»

    A web ACL associated with the ALB can block an IP set at the application layer.

    When not: If the block must apply to any protocol in a subnet, you use a network ACL (security groups have no deny rules). WAF also cannot be associated with a Network Load Balancer.

  • «stop bots and brute-force attacks against the login page»

    WAF combines rate-based rules on the login path, Bot Control, and the Account Takeover Prevention managed rule group.

    When not: If the scenario is about authenticating users, MFA, or federation, the service is Amazon Cognito or IAM, not WAF.

Often paired with

  • Amazon CloudFront
  • Elastic Load Balancing (ELB)
  • Amazon API Gateway
  • Amazon Cognito
Study AWS WAF →