0Pricing
AWS Security Academy · Lesson

How AWS WAF Inspects Requests

Understand how WAF filters HTTP traffic at the application layer.

How AWS WAF Inspects Requests is a free AWS Security Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Layer 7 Protection

AWS WAF (Web Application Firewall) inspects HTTP and HTTPS requests at the application layer (Layer 7), unlike security groups and NACLs that work at Layers 3 and 4. It can read URLs, headers, query strings, and bodies to block attacks that look like normal network traffic but carry malicious payloads.

What It Defends Against

WAF targets common web threats such as SQL injection, cross-site scripting (XSS), bad bots, and application-layer floods. These attacks ride on legitimate ports 80 and 443, so lower-layer firewalls cannot distinguish them. WAF examines request content to tell good from bad.

Inspection Components

WAF can inspect many parts of a request: the URI path, query string, HTTP headers, cookies, HTTP method, and body. You choose which component each rule examines. For example, a rule might scan the query string for SQL keywords or check a header for a known attack signature.

Match Conditions

Rules use match statements like string match, regex match, size constraint, IP set, and geo match. You can also apply text transformations such as URL-decoding or lowercasing before matching, which defeats attackers who obfuscate payloads with encoding tricks.

Allow, Block, Count, CAPTCHA

When a rule matches, WAF takes an action: allow, block, count, CAPTCHA, or challenge. Count mode logs matches without blocking, letting you test a rule safely before enforcing it. CAPTCHA and challenge actions verify the client is a real browser, deterring bots.

Inline Inspection

WAF evaluates requests inline and synchronously before they reach your application, adding minimal latency. Blocked requests never touch your backend, which both protects the app and reduces load. This positions WAF as a gatekeeper at the edge of your stack.

Body Size Limits

WAF inspects the request body up to a default size limit (8 KB for many integrations, larger for newer ones). Content beyond the limit can be allowed through or blocked depending on your configuration. Attackers may try to hide payloads past the inspection limit, so this is worth tuning.

Logging Requests

WAF can send detailed logs of inspected requests to CloudWatch Logs, an S3 bucket, or Kinesis Data Firehose. Logs show which rule matched and the action taken, which is essential for tuning rules, investigating attacks, and proving compliance during an audit.

Default Action

Every WAF policy has a default action applied to requests that match no rule: allow or block. Most public web apps use a default of allow and block specific bad patterns. Locked-down APIs may default to block and allow only known-good requests.

WAF Versus Shield

WAF filters application-layer content, while AWS Shield defends against volumetric DDoS floods at Layers 3 and 4. They are complementary: Shield absorbs the flood, WAF inspects the requests that get through. The exam often asks which tool addresses which kind of attack.

Where WAF Lives

WAF does not sit inline by itself; it attaches to a supported resource such as CloudFront, an Application Load Balancer, API Gateway, or AppSync. The resource forwards requests to WAF for inspection. Choosing the right attachment point is covered later in this course.

Quick Check

Test your understanding of WAF inspection.

Recap

AWS WAF inspects HTTP/HTTPS requests at Layer 7, reading URIs, headers, query strings, and bodies to stop SQL injection, XSS, and bad bots. Rules use match statements with text transformations and take actions of allow, block, count, CAPTCHA, or challenge. Inspection is inline with logging to CloudWatch, S3, or Firehose. WAF complements Shield and attaches to CloudFront, ALB, API Gateway, or AppSync.

Frequently asked questions

Is the “How AWS WAF Inspects Requests” lesson free?

Yes — the full text of “How AWS WAF Inspects Requests” is free to read here on the web, and the AWS Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Security Academy course, upgrade to CoddyKit PRO.

What will I learn in “How AWS WAF Inspects Requests”?

Understand how WAF filters HTTP traffic at the application layer. You practise AWS Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start AWS Security Academy?

No prior experience is required. AWS Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “How AWS WAF Inspects Requests” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this AWS Security Academy lesson?

Yes. Every AWS Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. How AWS WAF Inspects Requests
  2. Rules, Rule Groups, and Web ACLs
  3. Managed Rules and Rate Limiting
  4. Attaching WAF to CloudFront and ALB
← Back to AWS Security Academy