Skip to content

type: aws_waf

Get the aws-waf-token cookie with one call.

Send the address of the page that shows the AWS WAF captcha. We send back the aws-waf-token value, ready to use as a cookie.

AWS WAF at a glance
type
aws_waf
you send
website_url
optional
proxy, user_agent
you get
aws-waf-token cookie value
price
$0.000800 per solve, $0.80 per 1,000
not solved?
nothing is charged

What is the AWS WAF captcha?

AWS WAF is the web firewall that Amazon Web Services offers to the sites it hosts. A site owner can tell it to show a captcha when traffic looks automated, or when someone sends too many requests. Instead of the page you wanted, you get a screen asking you to confirm you are human, usually with a picture puzzle, sometimes with audio.

When you pass, the site sets a cookie called aws-waf-token. Your browser sends that cookie with every request after that, and the firewall lets those requests through. You’ll run into this on shops, travel sites, account pages, sign-ups, and anywhere a site on AWS wants to slow down bots.

A script that doesn’t have the cookie keeps getting the captcha page. DraxonCloud gets you the cookie value, so your script can carry on like a visitor who passed.

How to solve the AWS WAF captcha with DraxonCloud

  1. Copy the address of the page that shows the AWS WAF captcha.
  2. Send it to our API with the type aws_waf.
  3. Wait for the answer in one request.
  4. Add the value as an aws-waf-token cookie to your requests to the site.

No site key to hunt for, no browser to run.

What you send

  • website_url: the full address of the page that shows the captcha, like https://shop.example/account. Use the page you actually want to open, so the token is made for that site.
  • proxy (optional): your proxy, as user:pass@host:port or with a scheme like http:// or socks5://. Send one if your script uses a proxy, so the solve and your later requests come from the same place.

That’s it. There is no site key for AWS WAF.

What you get back

A solved task gives you solution.token. This is the value of the aws-waf-token cookie.

To use it:

  • Set a cookie named aws-waf-token with exactly this value for the site’s domain.
  • Or add it to your request’s Cookie header, like Cookie: aws-waf-token=<solution.token>.
  • If you sent a proxy, send these requests through the same proxy.
  • Keep using the cookie for the next requests. When the site starts showing the captcha again, ask for a new one.

Copy the value exactly. Don’t trim or decode it.

A quick example

Start a task:

curl -s -X POST https://draxon.one/api/captcha/v1/tasks \
  -H "Authorization: Bearer $DRAXON_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "aws_waf",
    "website_url": "https://shop.example/account"
  }'

Wait for it:

curl -s -H "Authorization: Bearer $DRAXON_KEY" \
  "https://draxon.one/api/captcha/v1/tasks/<id>?wait=30"

The answer (some fields left out):

{
  "status": "solved",
  "solution": {
    "token": "a1b2c3d4-e5f6-...:AAoAgQ6Hc4j0AAAA:..."
  }
}

Then use it:

curl -s -H "Cookie: aws-waf-token=<solution.token>" https://shop.example/account

Already using another service?

  • CapSolver and Anti-Captcha style: createTask with AwsWafTask, AwsWafTaskProxyless, AntiAwsWafTask, AntiAwsWafTaskProxyLess, AmazonTask or AmazonTaskProxyless. In the result, solution.cookie holds the value and solution.cookies holds {"aws-waf-token": "..."}.
  • 2Captcha style: in.php with method=amazon_waf and pageurl. No sitekey needed.

Change the address to ours and use your DraxonCloud key. See Compatible APIs for formats.

When the captcha keeps coming back

If the site still shows the AWS WAF page after you send the cookie, check these:

  1. The cookie name. It must be exactly aws-waf-token, with the value copied as it is.
  2. The domain. Set the cookie for the same site you are visiting. A cookie for shop.example is not sent to other.example.
  3. The proxy. If the solve went through a proxy, your requests should too.
  4. The page. Send the address of the page that showed the captcha, on the same site you then visit.
  5. Time. A token doesn’t last forever. When the captcha appears again later, ask for a new one.

A task that ends as failed or expired costs nothing, so trying again is free.

What it costs

You pay for each solved AWS WAF captcha. The live price is in the box at the top of this page and on the pricing page. The price is set aside when you start a task, charged only when you get a token, and returned in full if the task fails or runs out of time. One task, one charge at most.

Tips that save you time

  • Reuse the cookie. One aws-waf-token can cover many requests. Solve again only when the captcha comes back.
  • Use the same proxy for the solve and the requests that follow, if you use a proxy at all.
  • Send the exact page you want. A token for the wrong site won’t help.
  • Look at the cookie name. If the site sets something other than aws-waf-token, it may not be AWS WAF.
  • Use ?wait=30 to get the answer in one request.
  • Retry safely with an Idempotency-Key header, so a repeated request never costs twice.

Code in Python and Node.js, all fields and every error are in the AWS WAF docs.

Questions people ask

Short, plain answers. The docs have every detail.

What do I need to send?

Just the full address of the page that shows the AWS WAF captcha. There is no site key for this type. A proxy is optional.

What do I get back?

The value of the aws-waf-token cookie. Set it as a cookie named aws-waf-token on your requests to the site, and the site lets you through.

How do I know the site uses AWS WAF?

The captcha page usually asks you to confirm you are human with a picture or audio puzzle, and after you pass it, the site sets a cookie named aws-waf-token. Check your browser's cookies for it.

Do I need a proxy?

No, it's optional. If you send one, use the same proxy for the requests that carry the cookie, so the site sees the same visitor.

What happens if a solve fails?

You pay nothing. The price is held while the task runs and returned if it fails or runs out of time.

Can I keep my CapSolver or 2Captcha code?

Yes. AwsWafTask, AntiAwsWafTask, AmazonTask and the 2Captcha amazon_waf method all work with your DraxonCloud key.

Am I allowed to use this on any site?

Only on sites you have the right to automate. Some sites are blocked on our side. Please read the Terms before you start.

AWS WAF without a browser of your own

What each way of getting a token asks of you, and the three steps this one takes.

Ways to get a AWS WAF token, compared
Approach What you run Where the token comes from What tends to break
Your own browser automation A real browser per solve, with a driver and a display You answer the puzzle yourself, or you babysit it Puzzle layouts change and the script that clicked them stops working
A solver stack of your own Recognition models, a browser, and the plumbing between them Yours, as long as the models keep up with the puzzles Puzzles that need a browser session still need a browser session
DraxonCloud One HTTPS request from anything that can send one The AWS WAF token, returned by the API Nothing you host; the response tells you why a task failed

Costs above are what each approach asks of you, not a claim about which is cheaper at every volume. The AWS WAF docs list every field and every error code.

  1. 01

    Create a key

    Make an account and create an API key from the dashboard. It starts with drx_ and carries the scopes you pick.

  2. 02

    Send the AWS WAF details

    One request with the page address, the site key and the type aws_waf. Add rqdata, a proxy or a user agent only if the site needs them.

  3. 03

    Use the token

    The answer carries the token your form expects. Submit the form through the same proxy and user agent you solved with.

Start solving AWS WAF today.

Make an account, add funds, create a key. If a captcha is not solved, you pay nothing.