AWS WAF CAPTCHA and Challenge: Amazon's bot check stopped you
- Made by
- AWS
- Variants
- CAPTCHA action (status 405, puzzle) · Challenge action (status 202, silent script) · CAPTCHA JavaScript API widget
What you see
x-amzn-waf-action: captchax-amzn-waf-action: challengeaws-waf-token405 Method Not Allowed
More error strings (5)
window.gokuPropschallenge.jstoken.awswaf.comAwsWafIntegrationLet's confirm you are human
What it means
Amazon’s firewall (AWS WAF) stopped your request before it reached the site. It wants proof that a real browser, or a real person, is asking. You get status 405 for a puzzle (CAPTCHA) or 202 for a silent browser check (Challenge), not the page you wanted.
What we measured: free tools on AWS WAF sites
We ran 11 free scraping tools on the AWS WAF sites in our test (all sites), each as installed with one setting for every site, with a fresh IP for every load (open-source benchmark, run scrapenews-open-source-benchmark-2026-11-26, 26 Nov 2026). Share of loads that passed:
| Tool | AWS WAF |
|---|---|
| Camoufox | 58% (7/12) |
| Scrapling StealthyFetcher | 75% (9/12) |
| Botasaurus | 25% (3/12) |
| nodriver | 33% (4/12) |
| Patchright | 75% (9/12) |
| curl-impersonate | 0% (0/12) |
| curl_cffi | 0% (0/12) |
| Scrapling Fetcher | 0% (0/12) |
| Crawl4AI | 0% (0/12) |
| tls-client | 0% (0/12) |
| curl (plain) | 0% (0/12) |
- Top tools: Scrapling StealthyFetcher, Patchright and Camoufox tie (58–75%).
- Top HTTP clients: none passed.
Which tool types get past it: start from the table. Scraper and unblocker APIs run this step for you; we have not measured them on AWS WAF.
Why it happens
The site owner wrote a firewall rule with a CAPTCHA or Challenge action. When your request matches it, AWS checks one thing: do you carry a valid aws-waf-token cookie?
- Valid token: you go through.
- No token, a bad one or an old one: you’re blocked and get the check instead.
Why you have no valid token, most common first:
- Your client can’t run JavaScript. An AWS script in the browser makes the token.
requests,curland plainfetchnever run it. - You’re going too fast. AWS tells site owners to add a rate rule that shows CAPTCHA or Challenge at a lower limit than their hard block.
- Your token expired. Each pass lasts an “immunity time” the site sets. The default is 300 seconds (5 minutes).
- Your token doesn’t match. It’s tied to the site’s domain. AWS Bot Control also compares the type of IP that got the token with the type of IP sending it. The FuckCaptcha project says a new IP or user agent mid-session usually breaks it.
- The AWS script is blocked. It loads from
awswaf.com. In one report, a NoScript user saw a blank IMDb page until they allowed that domain.
Accessibility: AWS says its puzzles offer an audio version, screen reader and keyboard support, and meet WCAG (the web accessibility standard). A11Y Boost notes that audio CAPTCHAs are often distorted and still hard for people with hearing loss or cognitive impairments.
Why two actions? AWS pitches CAPTCHA as the middle road: for traffic where a hard block would stop too many real people, but letting everyone in lets in too many bots. Challenge is the quiet version. It checks in the background that the client is a browser, and a human visitor never sees a thing.
“Run JavaScript” is only half of it. The challenge script questions the browser and writes the answers into the token: signs of automation, and browser settings that don’t add up. So a headless browser that looks automated carries that inside its pass.
Throwing tokens away doesn’t make you new, either. With AWS’s bot and fraud rule groups, AWS computes a browser fingerprint ID that stays the same across new tokens. Bot Control’s targeted rules also cap how many requests a client may send without a valid token.
Fix it
- Confirm it’s AWS WAF. Look for the header
x-amzn-waf-actionwithcaptchaorchallenge. A 405 without it is a normal “wrong method” error from the site. - Slow down. Fewer requests per minute keeps you under the rate rule that often shows the check.
- Look for an unchecked door. An official API, open data portal or feed on another path may not sit behind the rule.
- Challenge (202)? Use a real browser. Let
challenge.jsrun. It saves the token and resends your request on its own. FuckCaptcha names Patchright, Camoufox and undetected-chromedriver for this. - Keep the token, IP and user agent together. Send
aws-waf-tokenon every request to the same host. Expect a new check when the immunity time runs out (sites can set 1 minute to 3 days). FuckCaptcha sayscurl_cffican reuse the token if its browser fingerprint matches. - CAPTCHA (405)? You need a person or a solving service. Services whose docs list AWS WAF: 2Captcha, Anti-Captcha, CapMonster Cloud, CapSolver. They ask for
key,ivandcontextfromwindow.gokuPropson the check page. Grab fresh values every time. - Your own site? Put these actions only on
GETrequests that want HTML. AWS says they can’t run onPOST, preflightOPTIONSor other methods. For APIs, check an HTML page first and set the immunity time long enough to cover the API calls that follow.
Why slow down first? Every new token costs you a browser run or a paid solve. Staying under the rate rule costs nothing.
Why keep IP and user agent fixed? AWS says the token fingerprints the client session with client identifiers. Bot Control also labels requests where the IP that got the token and the IP using it are of different types. The site’s rules then decide what to do with that label. So solving on one machine and spreading the token over a proxy pool is asking for trouble.
Why fresh values for solvers? CapMonster Cloud says some values change with every render of the page. Anti-Captcha calls iv and context temporary and key permanent.
Our advice: keep one browser session alive per site. FuckCaptcha notes the token refresh logic lives in the AWS script, so a live session renews its pass on its own.
Paste this into your AI
My scraper hits an AWS WAF check instead of the real page.
Status: <405 or 202>. Header x-amzn-waf-action: <captcha / challenge / missing>.
Body: <empty, or a page with window.gokuProps and challenge.js>.
Explain in plain words what this check is.
Then list the likely causes in order, most likely first.
For each cause, give one way to test it and one fix.
My setup: <language + library>, <the URL pattern>, <requests per minute>,
<proxy type or none>, <the request headers I send, incl. Accept>,
<do I keep the aws-waf-token cookie between requests: yes/no>.Dev details
What AWS sends back (from the AWS docs):
# CAPTCHA
status: 405
x-amzn-waf-action: captcha
# Challenge
status: 202
x-amzn-waf-action: challenge
# both
access-control-allow-origin: *
access-control-allow-methods: OPTIONS,GET,POST
access-control-max-age: 86400
access-control-expose-headers: x-amzn-waf-action
- The check page comes only if your request has
Accept: text/html. Without it, expect an empty body. - The exposed CORS header means browser JavaScript can read
x-amzn-waf-action, even cross-origin. - Page markers:
window.gokuProps = {"key": …, "iv": …, "context": …},window.awsWafCookieDomainList,<div id="challenge-container">and a script likehttps://<id>.<region>.token.awswaf.com/…/challenge.js. The puzzle script comes from…captcha.awswaf.com/…/captcha.js.
Detect it before you parse:
const res = await fetch(url, { headers });
const action = res.headers.get("x-amzn-waf-action"); // "captcha" | "challenge" | null
if (action) throw new Error(`AWS WAF ${action} on ${url} (status ${res.status})`);
Edge cases:
- 202 looks like success. It’s a 2xx code. One search crawler stored 191,605 AWS WAF 202 pages as “fetched” in 24 hours, 20.5% of its pages (measured 2026-11-08). A feed reader logged
fetched 0 itemswith no warning (2026-10-05). Check the header, not just the status. - CAPTCHA runs the challenge first. With no token yet, the CAPTCHA page runs the silent challenge, then the puzzle. On success it resends your original request.
- Puzzles rotate. AWS shows picture grids (“Choose all the chairs”) and an audio version, and keeps adding new types. FuckCaptcha also lists a distorted-text version.
- HTTPS only. Puzzles and challenges run only on HTTPS pages, in a secure browser context.
- Domain match. By default the token works only for the exact
Host. A site’s token domain list (e.g.example.com) also covers its subdomains. - Immunity limits. Default 300 seconds for both. Minimum 300 for Challenge, 60 for CAPTCHA, maximum 259,200 (3 days). A rule can override the site-wide value.
- What’s in the token. It’s encrypted. It holds the last challenge and CAPTCHA solve times plus browser checks, such as signs of automation and settings that don’t add up.
Why is the body so often empty? The check page only comes for Accept: text/html. An API client that asks for JSON gets a bare 202 or 405. Your code then sees a JSON parse error, or “0 items”, and never the word CAPTCHA.
In a pipeline, make the check a named outcome, not a crash or a success. Read x-amzn-waf-action on every response, log the URL and count checks per domain. A sudden jump means the site changed its rules or flagged your setup. Never store a checked page as real content.
If you run the site and real users loop: with AWS’s bot or fraud rule groups on, each request gets token labels. awswaf:managed:token:accepted means fine. rejected:expired, rejected:domain_mismatch, rejected:not_solved and absent tell you why a check fired. The awswaf:managed:captcha: versions do the same for the puzzle.
Open questions
AWS doesn’t say everything its token checks. For security reasons, it gives no full list of what goes inside or how it’s encrypted.
Why it matters: the exact rules for reusing a token are not public. AWS documents the domain match, the immunity time and Bot Control’s IP-type check. Beyond that, advice like “a new IP or user agent usually breaks the token” comes from people who solve these checks, not from AWS.
So test it on the site you care about. Reuse one token, change one thing at a time (IP, user agent, headers) and watch when x-amzn-waf-action comes back.
scrapenews difficulty
24/100 · Easy from 4 of 8 factors
| Factor | What we found | Source |
|---|---|---|
| Smallest client that gets through | an HTTP client that runs the page's JavaScript | scrapfly.io |
| Checks stacked | IP reputation, JavaScript challenge | scrapfly.io |
| Cheapest solver price | $1.40 per 1,000 solves | capmonster.cloud |
| Steps for a human | none: nothing to click | docs.aws.amazon.com |
Our analysis of 4 sourced facts; measured runs replace them as they come. How we rate difficulty
Related
Tools that get past it
| Tool | Price |
|---|---|
| $1.00/1k solves | |
| $0.95/1k solves | |
| Free | |
| $0.60/1k solves | |
| from $6.00 | |
| Free | |
| Free | |
| Free |
Sources
AWS docs: CAPTCHA and Challenge action behavior (405, 202, x-amzn-waf-action) docs.aws.amazon.com
AWS docs: CAPTCHA and Challenge in AWS WAF (when each is used) docs.aws.amazon.com
AWS docs: Types of token labels (accepted, rejected, absent, fingerprint) docs.aws.amazon.com
AWS docs: Token immunity times docs.aws.amazon.com
AWS docs: AWS WAF token characteristics (aws-waf-token) docs.aws.amazon.com
AWS docs: How AWS WAF uses tokens (Bot Control IP check) docs.aws.amazon.com
AWS docs: Token domains and domain lists docs.aws.amazon.com
AWS docs: Best practices for CAPTCHA and Challenge docs.aws.amazon.com
AWS docs: AWS WAF CAPTCHA puzzles (audio, screen readers, WCAG) docs.aws.amazon.com
AWS docs: CAPTCHA puzzle examples docs.aws.amazon.com
FuckCaptcha (CC0): Amazon WAF CAPTCHA field guide (signals) github.com
A11Y Boost: Are CAPTCHA systems failing accessibility? a11yboost.com
2Captcha docs: Amazon WAF captcha 2captcha.com
Anti-Captcha docs: Bypass Amazon WAF (gokuProps and widget) anti-captcha.com
CapMonster Cloud docs: Amazon AWS WAF Captcha and Challenge docs.capmonster.cloud
CapSolver docs: AWS WAF CAPTCHA token (405 + gokuProps) docs.capsolver.com
bxl_eda_worker issue #15: European Parliament feeds get 202 + x-amzn-waf-action: challenge github.com
WebSearchEngine issue #34: AWS WAF 202 pages stored as fetched github.com
NoScript issue #507: AWS challenge shows a blank page on imdb.com github.com