AWS WAF

Last updated on December 7, 2025

AWS WAF Cheat Sheet

  • AWS WAF is a web application firewall that protects web applications and APIs from common web exploits by allowing you to configure rules that allow, block, or monitor (count) web requests based on conditions you define.
  • Conditions can include IP addresses, HTTP headers, request body, URI strings, SQL injection attempts, and cross-site scripting (XSS).

Features

Flexible Rule-Based Filtering

  • Create rules using conditions based on IPs, headers, body, URI paths, geographic location, and more.

  • Detect and block common exploits such as SQL injection and XSS.

  • JSON body inspection allows validating keys/values for secure API protection.

Rule Types

  • Regular Rules – Target specific patterns/conditions.

  • Rate-Based Rules – Automatically block or rate-limit IPs exceeding a request threshold within a 5-minute window.

  • Managed Rules – Pre-configured, automatically updated rulesets from AWS and AWS Marketplace partners.

  • Tutorials dojo strip

Web ACLs (Access Control Lists)

  • Combine multiple rules into a Web ACL.

  • Assign actions per rule: allow, block, or count.

  • Define a default action for unmatched requests.

Visibility and Monitoring

  • Real-time metrics in Amazon CloudWatch.

  • Full logging with request details: IP, geo-location, URI, User-Agent, Referer, etc.

  • Supports AWS WAF Security Automations solution for auto-deployed rule sets + log analysis via Amazon Athena.

HTTP Header Injection

  • Insert custom headers into allowed requests to ensure requests passed through WAF.

  • Useful for application validation, logging, or different handling paths.

Custom Response Control

  • Configure custom HTTP status code & response body for blocked requests.

Use Cases

  • Protecting web applications from SQL injection, XSS, and common OWASP threats.

  • Enforcing API request validation using JSON inspection.

  • Rate-limiting abusive or bot-origin traffic.

  • Using Managed Rules to automatically mitigate known vulnerabilities.

  • Adding custom headers for downstream verification or analytics.

  • Automating incident response and traffic filtering using WAF Security Automations.

Security

  • Blocks or filters malicious traffic using customizable rules.

  • Managed rules continuously updated by AWS and security vendors.

  • Provides full logging for forensic analysis and investigation.

  • Can be used alongside AWS Shield for DDoS mitigation.

  • Supports secure handling of HTTP body and JSON content with size constraints.

  • Integrates with CloudFront, ALB, API Gateway, and AWS AppSync for global and regional protection.

AWS WAF Pricing

  • AWS WAF charges based on:

    1. Number of Web ACLs you deploy.

    2. Number of rules per Web ACL (managed or custom).

    3. Number of web requests processed monthly.

    Costs vary by region and by traffic volume.

Note: If you are studying for the AWS Certified Security Specialty exam, we highly recommend that you take our AWS Certified Security – Specialty Practice Exams and read our Security Specialty exam study guide.

AWS Certified Security - Specialty Exam Study Path

AWS WAF Cheat Sheet References:

https://docs.aws.amazon.com/waf/latest/developerguide
https://aws.amazon.com/waf/features/
https://aws.amazon.com/waf/pricing/
https://aws.amazon.com/waf/faqs/

Tutorials Dojo portal

Learn AWS with our PlayCloud Hands-On Labs

🧑‍💻 50% OFF – CodeQuest Coding Labs

$2.99 AWS and Azure Exam Study Guide eBooks

tutorials dojo study guide eBook

New AWS Generative AI Developer Professional Course AIP-C01

AIP-C01 Exam Guide AIP-C01 examtopics AWS Certified Generative AI Developer Professional Exam Domains AIP-C01

Learn GCP By Doing! Try Our GCP PlayCloud

Learn Azure with our Azure PlayCloud

FREE AI and AWS Digital Courses

FREE AWS, Azure, GCP Practice Test Samplers

Subscribe to our YouTube Channel

Tutorials Dojo YouTube Channel

Follow Us On Linkedin

Written by: Jon Bonso

Jon Bonso is the co-founder of Tutorials Dojo, an EdTech startup and an AWS Digital Training Partner that provides high-quality educational materials in the cloud computing space. He graduated from Mapúa Institute of Technology in 2007 with a bachelor's degree in Information Technology. Jon holds 10 AWS Certifications and is also an active AWS Community Builder since 2020.

AWS, Azure, and GCP Certifications are consistently among the top-paying IT certifications in the world, considering that most companies have now shifted to the cloud. Earn over $150,000 per year with an AWS, Azure, or GCP certification!

Follow us on LinkedIn, YouTube, Facebook, or join our Slack study group. More importantly, answer as many practice exams as you can to help increase your chances of passing your certification exams on your first try!

View Our AWS, Azure, and GCP Exam Reviewers Check out our FREE courses

Our Community

~98%
passing rate
Around 95-98% of our students pass the AWS Certification exams after training with our courses.
200k+
students
Over 200k enrollees choose Tutorials Dojo in preparing for their AWS Certification exams.
~4.8
ratings
Our courses are highly rated by our enrollees from all over the world.

What our students say about us?