Skip to content

Monetize AI Bot Traffic with AWS WAF: Get Paid by AI Agents

Learn how AWS WAF AI Traffic Monetization lets you charge AI bots and agents for accessing your content and APIs using simple per-request payments on Base and Solana. Includes setup steps, pricing, and practical examples.

AWS WAF AI Traffic Monetization

AI bots and agents are flooding websites and APIs, consuming valuable content and data without paying. If you run a content site, API, or dataset, this free usage can hurt your revenue and server costs.

AWS WAF now solves this problem. With AI Traffic Monetization, you can charge AI clients directly at the edge using real micro-payments. When a bot requests your content, it gets a clear "pay to access" response. The bot pays in USDC, and your content is delivered only after payment is confirmed.

This feature uses an open standard, works globally on CloudFront, and adds no extra cost beyond standard WAF pricing. You keep full control and get paid straight to your wallet.

How AI Traffic Monetization Works

The process follows a clean request flow:

  1. An AI agent requests your protected resource.
  2. AWS WAF checks your rules. If it matches a monetized rule and no valid payment is attached, it returns HTTP 402 Payment Required.
  3. The 402 response includes the price, accepted networks, and your wallet address.
  4. The agent signs a payment authorization and resends the request.
  5. WAF verifies the payment, fetches content from your origin, settles on-chain, and serves the response.

Key benefits:

  • No charge if your origin returns an error.
  • Single-use payments with replay protection.
  • Idempotency support so agents can safely retry.

Supported Resources

You can monetize any content delivered through CloudFront:

  • Web pages and articles
  • API endpoints
  • Data feeds and JSON
  • Media files
  • Structured datasets

Getting Started

Prerequisites

  • AWS WAF web ACL associated with a CloudFront distribution
  • USDC wallet address on Base or Solana
  • (Recommended) AWS WAF Bot Control enabled

Quick Setup Steps

  1. Enable Bot Control in your web ACL.
  2. Create or edit a web ACL in the CloudFront (Global) region.
  3. Add a MonetizationConfig to define your payment settings.
  4. Create rules with the Monetize action targeting bot traffic.
  5. Associate the web ACL with your CloudFront distribution.

Here is a basic MonetizationConfig example:

json
{
  "MonetizationConfig": {
    "CurrencyMode": "REAL",
    "CryptoConfig": {
      "PaymentNetworks": [
        {
          "Chain": "BASE",
          "WalletAddress": "0x1234567890abcdef1234567890abcdef12345678",
          "Prices": [
            {
              "Amount": "0.001",
              "Currency": "USDC"
            }
          ]
        }
      ]
    }
  }
}

Test Mode

Start with CurrencyMode: "TEST" to validate everything using testnet funds. Switch to "REAL" when ready for live payments.

Best Practices for Rules

Always combine Monetize with Bot Control labels to avoid affecting human users.

Example rule (JSON):

json
{
  "Name": "MonetizeBotsOnly",
  "Priority": 5,
  "Statement": {
    "LabelMatchStatement": {
      "Scope": "LABEL",
      "Key": "awswaf:managed:aws:bot-control:bot"
    }
  },
  "Action": {
    "Monetize": {}
  }
}

Human traffic passes through normally. Only labeled bots see the payment challenge.

Supported Payment Networks

ChainNetworkCurrencyPurpose
BASEBase mainnetUSDCProduction
SOLANASolana mainnetUSDCProduction
BASE_SEPOLIABase Sepolia testnetUSDCTesting
SOLANA_DEVNETSolana DevnetUSDCTesting

Pricing Options

Set a base price in your MonetizationConfig (minimum $0.001 USDC per request).

Use PriceMultiplier on individual rules to adjust pricing. For example:

  • Base price: $0.001
  • Rule multiplier: 3 → Effective price: $0.003

Common strategies:

  • Low price for helpful search crawlers
  • Standard price for RAG/summarization agents
  • High price or Block for training scrapers

Revenue and Analytics

Use the built-in dashboard to track:

  • Total revenue
  • Top bots and paths by earnings
  • Settlement records with transaction IDs

Payments settle directly to your wallet. AWS does not touch the funds.

Communicating Usage Terms

Pair monetization with RSL (Really Simple Licensing) in your robots.txt or via CloudFront response headers so agents know exactly how they may use your content.


Frequently Asked Questions

1. Do human visitors get blocked?

No. Use Bot Control labels so only AI bots receive the 402 payment challenge. Humans continue accessing content normally.

2. What is the minimum price per request?

$0.001 USDC. You can go higher with multipliers.

3. Which blockchains are supported?

Base and Solana for production, with testnets for development.

4. When does the client actually pay?

Payment is verified before content is fetched and settled only after a successful 2xx response from your origin.

5. Can I offer free access to certain bots?

Yes. Use the Allow action for verified search engines or partners.

6. How much extra latency does it add?

A few seconds only for requests that perform payment processing. Normal traffic is unaffected.

7. What happens if settlement fails?

The client receives an error and can retry. No content is served until payment succeeds.

8. Do I need special client software?

Any agent that supports the open x402 protocol can pay. Popular runtimes already work.

My SaaS
Acluebox
Build modular and reusable system prompts with my SaaS,
Acluebox
. Also, free prompt template generators there.

References

Tags

AWSWAF

Made with ❤️ by Mun Bock Ho

Copyright ©️ 2026