Back to Knowledge Hub
Fingerprint

AWS WAF Bot Control: What a Client Actually Sees

Common and targeted AWS WAF levels inspect different things, and a block reads nothing like a challenge. One measured 403 shows the difference.

BotBrowser Team

Documentation

Want the structured docs for Fingerprint?

This article lives in the editorial library. For step-by-step setup, reference material, and ongoing updates, jump into the docs section.

A managed rule group is a decision engine, and the useful question is not whether it fired but what it was given. BotBrowser provides a declared profile that keeps the surfaces a page can read consistent with each other, and it does not change what a rule group decides at the edge. This article reads one vendor's bot control as a structure rather than a score: two protection levels that inspect different things, a label mechanism that lets one rule feed the next, and an action set where a block and a challenge produce visibly different responses.

TL;DR

  • Bot Control is one managed rule group with two protection levels, common and targeted, and enabling only the common level leaves the behavioural checks off.
  • The common level detects bots that identify themselves, using static request data analysis; the targeted level includes the common protections and adds detection for bots that do not.
  • A matched rule can attach a label, and later rules can match on that label, which makes the rule language composable rather than a single score.
  • Block and Challenge are different actions: one ends the request, the other asks the client to run a script and retry.
  • A measured request without a user agent returned 403 with a 919-byte HTML body and no challenge script, which is a block rather than a challenge.
  • The same endpoint returned 200 with a browser user agent, so the difference in that measurement was the request, not the path.
  • Labels are the part most teams miss, because a dashboard showing "blocked" does not say which rule group or which label produced the decision.
  • A page-side profile can keep its own surfaces consistent and cannot make an edge decision succeed.

Contents

Three panels. The first separates the common and targeted protection levels of one managed rule group and what each inspects. The second shows a matched rule emitting a label that a later rule consumes. The third compares a block, a 403 with a short body, against a challenge that returns a script for the client to run.

One rule group, two protection levels

The first thing to get right is that Bot Control has two protection levels inside a single managed rule group. The common level runs by default; the targeted level is an option that adds detection for clients that do not identify themselves. A team that leaves the targeted level off and reads the dashboard has covered a real slice of the problem and not the whole of it.

The common level detects a variety of self-identifying bots using traditional bot detection techniques such as static request data analysis. In the documentation's terms it labels self-identifying bots, verifies generally desirable ones such as search engines, and detects high-confidence bot signatures. These checks can be computed without asking the client to do anything, which is why they catch the least careful automation.

The targeted level includes the common-level protections and adds detection for sophisticated bots that do not self identify, mitigating with a combination of rate limiting, CAPTCHA and background browser challenges, and using browser interrogation, fingerprinting and behaviour heuristics, with optional machine-learning analysis of traffic statistics. That difference is the practical one for a data job: a client that satisfies the common level can still fail the targeted one, and the two failures look identical in a status code.

Reading the two levels together changes what a "blocked" number means, because the same 403 covers both. A block attributed to the common level is a statement about the request itself. A block attributed to the targeted level is a statement about the session, which means the same request sent once may pass and sent repeatedly may not. Without the level named, a report cannot tell those two situations apart, and the response to each is different.

Labels are the rule language

This is the structural difference that separates AWS WAF from a score-based product, and it is the part that repays study. When a rule matches, it can attach a label to the request. Later rules in the same web ACL can match on that label as if it were an input.

rule A matches   -> label aws:bot:category:http_library attached
                    (namespaced by the service, e.g. awswaf:managed:aws:bot-control:bot:category:http_library)
rule B reads     -> if label present, apply its own action
rule C reads     -> combine two labels into a narrower decision

That composition is what makes the language expressive. A score collapses every observation into one number, and a number cannot say which two checks agreed. A label set can, because each label keeps its own name and its own origin, and a rule that reads two labels is stating a conjunction rather than a cutoff.

The operational consequence is that a label is the unit to log. A dashboard that reports only the final action loses the reason, and a team debugging a false positive then has to change the client to find out which rule fired. Recording the labels through web ACL logs or CloudWatch metrics answers that question directly, and an explicit custom header interpolation is a separate configuration choice.

Labels also explain a behaviour that looks inconsistent from outside. Two requests with the same path and the same headers can receive different actions when an earlier rule matched on something the second request did not carry, and the difference is a label rather than a change in the endpoint.

The action set is where a client-side reading most often goes wrong, because both outcomes look like "it did not work" in a log that records only success or failure.

Block      -> 403 by default; the client receives an error response
Challenge  -> 202 with Accept: text/html; script, then retry with token
CAPTCHA    -> 405 with Accept: text/html; page completed by a person

With Accept: text/html, the middle action expects a silent script run; CAPTCHA returns JavaScript and also requires a person to finish a puzzle. Without text/html, the response form differs, so an action map has to include the request header. The 403 measured here cannot be retried into success. A client that treats every non-200 as a block will retry a challenge forever, because the retry never carries the token the challenge was asking for. A client that treats every non-200 as a challenge will run a script that does not exist, because the body is an error page rather than a challenge.

The distinction is visible in the response before any parsing. With Accept: text/html, a challenge carries a script the client is meant to run and a block carries an error document. The default status codes differ, 202 for a challenge and 403 for a block, so a status check separates them until a deployment customises the block response. A marker header, when present, identifies the answering layer rather than the rule that fired.

A measured block, and the actions it separates

The claim that these are different is easy to assert, so one request was recorded. A plain HTTPS client asked for a documentation page with no user agent header at all, and then the same client asked for the same page with a browser user agent.

no_ua:        status=403 bytes=919  challenge_marker=false block_marker=true
              server=CloudFront content-type=text/html
browser_ua:   status=200 bytes=18804
              server=Server content-type=text/html

Three things in that output are worth naming. The first is the status, which is a plain error rather than a challenge handshake. The second is the body length, which is short enough to be an error document and far too short to be a page that a client is meant to interact with. The third is the marker scan, which found no challenge script anywhere in the response.

The fourth thing is the comparison. The same client, the same path and the same second of the day returned a full page once the request carried a browser user agent. That is not proof of a rule firing, because the endpoint could be doing something else entirely; it is a demonstration that the difference between the two requests was in the request, and that a client can change one and not the other.

A block also tells the client nothing about which rule produced it. The 403 body measured above carried no rule name, no label string and no rule-group identifier, and that is the design rather than an omission: a response that named the rule would tell an operator which control to study next. The information exists in the console and in the request logs, which is why the diagnosis has to move there once the action is known. That is by design: the response does not carry the rule identity, the label set or the rule group. The information exists in the vendor's logs and in the console, which is why the diagnosis has to move there rather than staying on the client.

The boundary is the same one that applies to every edge decision, and it is worth stating in the terms this product uses. A rule group reads what arrives: the request line, the headers, the source, the pattern of requests over time, and the connection parameters the edge can observe.

It does not read the document. A value that only exists after JavaScript runs, such as a canvas hash, a WebGL renderer string or a computed layout measurement, is not an input to a rule that runs before the response is sent. That is not a limitation the vendor chose; it is the order of operations. The edge decides before the page exists.

That order has a practical consequence for a data job, and the measured pair above shows it: the same path returned 403 with 919 bytes and 200 with 18804 bytes. A client that produces a perfectly consistent document still has to satisfy the checks that run earlier, and those checks are about the request rather than the render. Conversely, a client that satisfies every request-level check has said nothing about whether its document would look consistent, because the rule group never asked.

The two layers are therefore not a single score with one cutoff, and the 403 above answers only the first question. A single request is evaluated before its document exists, so the raw canvas or WebGL value is not an input to that evaluation. What the targeted level can do is ask the client to run a challenge first and then read the token that comes back, which is how limited browser-side signals reach it. The two are different mechanisms, and a report that merges them cannot say which one produced a decision. Recording the edge action next to the page-side result keeps them separable, and a 403 with a 919-byte body is a different record from a 200 with a full page.

A third measurement sharpens the block-versus-challenge distinction, because the same endpoint answered three differently shaped requests in three different ways:

clean_get:    status=200 bytes=18804 challenge_marker=false block_marker=false
no_ua:        status=403 bytes=919   challenge_marker=false block_marker=true
scripted_post: status=403 bytes=1053 challenge_marker=false block_marker=true

Two of those are blocks and one is a success, and the two blocks differ in body length by a hundred and thirty-four bytes. That difference is small enough that a reader who only records the status code would see one event, while a reader who records the length and the marker scan sees two. Neither block carried a challenge script, which is what makes both of them terminal: there is nothing for a client to run, so retrying the same request produces the same answer.

The header set adds a second reading, and it is the field that separates the two layers most cleanly. The successful response reported server=Server, and both blocks reported server=CloudFront. That is not a rule identity and it does not name the rule group, but it does tell a reader which layer answered, and it separates a block generated in front of the application from a response the application produced.

What a reader should not conclude from this is that the user agent is the deciding input, and the 200 above does not establish that a header alone satisfies a managed rule group. It was the variable that changed in the first comparison, and it was sufficient to move one endpoint from an error to a full page. Whether it is sufficient anywhere else is a question about that endpoint's configuration, and the only honest way to answer it is to record the same three fields on the site in question rather than generalising from this one.

There is a second-order lesson in the numbers. A 919-byte response and an 18804-byte response differ by a factor of twenty, and a pipeline that stores only the status treats them as the same class of event when one is an error document and the other is a page. Storing the length costs almost nothing and separates the two immediately, which is why it belongs in the record next to the status rather than in a separate debugging session.

The rule group also has a time dimension that a single request cannot show. Behaviour checks look across requests, so a client that sends one request and reads the answer has measured the cheapest part of the system. A job that sends thousands is exercising the part that accumulates, and a report built from single requests cannot describe it. That is not a gap in the vendor's documentation; it is a gap in what one observation can support.

A request-level decision trace

A useful incident record follows the request in order. The client opens a connection, the edge receives the HTTP request, the managed rule group evaluates what is available before a document exists, any matched rule may add a label, and a later rule may use that label to choose an action. Only after an action returns does the client receive a page, challenge script or error document. Page JavaScript starts after that point, which is why a later canvas or WebGL observation cannot become evidence for an earlier edge decision.

Decision flow from HTTP and TLS request evidence through AWS WAF rules and labels to an action and the client response. JavaScript starts only after a page or a challenge requested with Accept text/html reaches the client.

The order is more useful than a dashboard count because it tells the investigator which evidence should exist at each step. A request record can show method, path, headers, source network and connection properties. An AWS log can show a rule group, matched rule, labels and action. The client record can show status, response bytes and whether a challenge marker was present. None of those records should be asked to prove a later layer's conclusion. The client cannot name the label that fired, and the edge cannot observe a document that has not been produced.

Request history also changes the question. The first request asks whether the current request matches a rule. A sequence asks whether the session accumulates a signal that one request did not carry. Rate-based decisions are especially easy to misread from a single response because the same status can appear after one anomalous request or after many ordinary ones. Store request time and sequence position even when the endpoint does not expose its own counter. That does not reveal the vendor's internal setting, but it preserves the fact that one request is only the visible tail of a sequence.

The two protection levels make this distinction operational. Common protections work from request data that identifies a bot or a known signature. Targeted protections can add interaction and behavioural checks that require more than one request or a challenge exchange. They can return the same 403, but the evidence behind the number is different. A report that keeps only the status merges a request classification, a session pattern and a failed interaction into one bucket.

Capability matrix comparing COMMON and TARGETED across HTTP, signature, JavaScript, rate, challenge, CAPTCHA and machine-learning columns. TARGETED adds session and browser interactions.

The practical trace has five fields: what the client sent, what the edge could observe, which rule group and labels the AWS log attributes, which action returned, and what the client did next. The fifth field is necessary because a challenge creates a second request. If the second request succeeds, a pipeline that counts only failures may report the first event as a block and omit the successful continuation. The event model must include the retry token exchange without storing the token itself.

This trace does not explain every decision. It does prevent three common false conclusions: that a 403 proves a particular rule, that a single request exhausted a rate limit without history, or that a page-side profile was evaluated by a rule that ran before the page existed. The missing part is named as missing, which is more useful than replacing it with a guess.

Read the response as a branching action

The next decision begins with the bytes returned, not the desired page. A successful page and a challenge can both be 200-family or customised responses, while default actions use different status codes. Read the status together with body length, content type, response headers, the presence of a challenge script and the request that produced it. No single field can distinguish every configuration, but the combination usually separates a page from a terminal error and a scripted challenge.

Response triage tree from status and body evidence to PAGE, BLOCK, CHALLENGE and CAPTCHA. With Accept text/html, a challenge returns script and expects a token on retry; a terminal block has no script.

The default action map is a starting point. A block returns an error response. With Accept: text/html, a challenge returns a script that the client runs before retrying, and a CAPTCHA returns a page that expects a person to complete an interaction. A site can customise response codes and bodies, so the status alone is not portable evidence. The safer rule is to record the complete response shape and mark the action as confirmed only when the body or the AWS logs support it.

Bodily evidence is easy to lose. An error document may be only a few hundred bytes, while a challenge includes script, markup and configuration. A full page is much larger again. These lengths vary by site, so do not turn one measured 919 or 18804 into a universal cutoff. Use the observed baseline for that endpoint and store the content type, encoding and body digest instead of the full body when the response may contain session material.

The retry path is part of the action. A challenge that succeeds after script execution is two requests and one token exchange. A terminal block is one request with no valid continuation. A CAPTCHA may be only one request from the browser, but it cannot be completed by script alone. A support pipeline that records the first response as "failed" without the next request cannot distinguish a solved challenge from a block that was retried until the client stopped.

Headers need the same restraint. Vendor marker headers can distinguish an edge response from an application response, but they are not a rule identifier. AWS documents x-amzn-waf-action as exposable through CORS Access-Control-Expose-Headers, so a cross-origin page script may read it when the site exposes that header; a missing read does not prove the header was absent. Record the header names and values needed for triage, then keep them away from analytics events, client scripts and reports that do not need them. A marker is evidence about which layer answered, not evidence about why the decision was made.

For a session that continues after an action, compare the second request with the first without assuming causation. The challenge token, cookies, source address, time gap and path may all change. Record the fields that could affect the retry. The goal is to make a replayable incident record from non-secret evidence, not to publish a successful response or a token that another client could reuse.

What belongs in an incident ledger

An incident ledger is the smallest record that lets a support case reproduce the investigation. It is not a copy of the request body. A useful row identifies the observation time, endpoint, request shape, HTTP result, response size, server layer, action evidence, sequence position and the AWS log fields available for that request. A second row carries the retry when a challenge occurred.

Evidence ledger with columns for time, HTTP status, server layer, label, action and response bytes. Three rows distinguish a page from two blocks with different body sizes, while the label remains unresolved on the client.

The ledger should keep client observation and service attribution in separate columns. Put the client-visible status, length and headers under one owner. Put the rule group, rule action and labels under the AWS log owner. If the AWS record is unavailable, write unavailable, not the most plausible rule. The same discipline applies to action names: block is supported by a terminal error response and a matching log; challenge is supported by challenge evidence and a retry exchange; captcha requires interaction evidence or an explicit log.

Minimise what the ledger keeps. The URL path and query shape may be enough, but do not retain credentials, cookies, CSRF values, challenge tokens, raw bodies, full IP addresses or customer identifiers. A stable internal request ID, a salted source hash and a body digest support correlation without preserving reusable secrets. Retention should follow the support case, not the default of a logging platform.

FieldWhy it belongsWhat it cannot prove alone
Time and sequenceSeparates one request from accumulated historyA vendor cutoff
Endpoint and request shapeMakes the incident reproducibleWhich rule matched
HTTP status and body lengthSeparates page, block and challenge candidatesA customised action
Server and response headersIdentifies the answering layerRule identity
AWS level, rule and labelsExplains service-side compositionWhether the client was consistent
Retry after challengeShows continuation or abandonmentThat the original signal was the cause
Outcome and ownerRoutes the next actionA universal classification

The retry row is where many reports lose the plot. A 202 followed by 200 is a completed challenge path. A 403 followed by another 403 is a terminal block unless the second request changed the relevant evidence. A 200 followed by a 403 may be a rate decision, a session change or an unrelated deployment. The ledger records the sequence and the changed fields; it does not label the second event a regression merely because the status differs.

The same ledger makes a false positive review possible. The application team can ask whether the endpoint changed, the security team can read the rule and label path, and the client operator can show what was sent without exporting a token. If the record contains only blocked: true, none of those owners can proceed. If it contains a short row with separate evidence columns, each owner can verify the part they control.

The time window should be long enough to include the start of the session and the retry, but short enough that an operator can read it. Keep the first request that triggered the action, the preceding bounded sample, any challenge retry and the next successful or terminal request. Do not retain an unbounded sequence merely because storage is cheap; the privacy cost and the review cost both grow faster than the diagnostic value.

Finally, write the conclusion at the lowest evidence level. "The edge returned a 403 error document at 14:32; AWS logs show the protection level, rule and labels available; the next request was not made" is a record. "The client was detected as a bot" is a conclusion that may be true, but the ledger has not shown the rule, the model or the service's internal reason. The difference lets a support case verify the result instead of trusting a label.

What the rule group cannot see, and the practical conclusion

Read the action before changing the client. A 403 with a short body is a block and needs the console to explain it; a response carrying a challenge script is a challenge and needs a client that can run it. Name the protection level in the record, because the common and targeted levels fail for different reasons and the same status code covers both. Keep the labels, since they are the only field that says which rule agreed with which other rule, and a single number throws that away; the 919-byte and 18804-byte responses above differ in exactly that kind of detail. For the vendor that composes differently, read Cloudflare and DataDome: what a scraper sees; for which rules need a value that never reaches the page, read edge-layer rules a page script cannot evaluate.

A declared profile can keep the values a page exposes consistent with each other, and it does not decide what a managed rule group returns. The decision belongs to the endpoint, and the useful work on the client side is making the record precise enough that the decision can be explained afterwards.

The label mechanism changes what a report can be asked to prove. A single score discards the observations and keeps a number, so a reader who disagrees has nothing left to examine; a label set keeps them, so a reader can ask which labels were present and which rule emitted each. That is the difference between a verdict and a record.

There is a cost to that expressiveness: a web ACL whose rules read each other's labels is harder to reason about, because evaluation order matters and a label present in one path can be absent in another. Keeping the label list in the log is what makes the difference recoverable later.

Finally, the action set has one asymmetry worth remembering when a report is written, and the three status values above show it. A block is a decision that can be explained afterwards from the console, and a challenge is a decision that produced a second request. Counting only the first request undercounts a challenge path by half, because the retry with the token is a separate entry that may succeed and leave no trace in a failure count. A report that wants to describe what happened has to decide which of those two it is counting before it prints a number.

For a second edge product with a different declaration map, compare Azure WAF Bot Protection declarations.

Sources

#AWS WAF#Bot Detection#Rule Labels#Challenge#Diagnosis

This article is part of the guide: What Is a Browser Fingerprint? Signals and Layers

Run the same check in BotBrowser

Load a profile, keep the signals you just read about consistent inside the browser, and confirm the result on your own machine before a rollout.