Description
AWS WAF now supports charging for a web request natively — a new per-rule
Monetize action (alongside the existing Allow / Block / Count /
Captcha / Challenge) together with a WebACL-level monetization configuration.
This enables pay-per-request / AI-traffic monetization (x402-style HTTP 402
"Payment Required" challenges) directly at the edge, without Lambda@Edge.
The provider's wafv2 rule action block and aws_wafv2_web_acl schema do not
yet expose this. I'd like to add support.
Announcement: https://aws.amazon.com/blogs/aws/aws-waf-adds-ai-traffic-monetization-capability-to-help-content-owners-charge-ai-bots-for-content-access/ (2026-06-15 (GA))
I'm planning to implement this myself. The live wafv2 API already accepts a
Monetize rule action (verified via CheckCapacity); the remaining dependency
is the aws-sdk-go-v2/service/wafv2 release carrying the Monetize shape and
WebACL MonetizationConfig. If the SDK shape is available I'll open a complete
PR; otherwise I'll open it as a draft and finalize on the SDK bump.
Affected Resource(s) or Data Source(s)
aws_wafv2_web_acl
aws_wafv2_rule_group
aws_wafv2_web_acl (data source)
aws_wafv2_rule_group (data source)
Potential Terraform Configuration
resource "aws_wafv2_web_acl" "example" {
name = "monetize-example"
scope = "CLOUDFRONT"
default_action {
allow {}
}
# New: WebACL-level monetization configuration
monetization_config {
crypto_config {
payment_network {
chain = "BASE"
wallet_address = "0x0000000000000000000000000000000000000000"
prices {
amount = "0.001"
currency = "USDC"
}
}
}
currency_mode = "REAL" # or "TEST"
}
rule {
name = "monetize-api"
priority = 10
statement {
byte_match_statement {
search_string = "/api"
positional_constraint = "STARTS_WITH"
field_to_match {
uri_path {}
}
text_transformation {
priority = 0
type = "NONE"
}
}
}
# New: per-rule Monetize action
action {
monetize {
price_multiplier = "5"
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "monetize-api"
sampled_requests_enabled = true
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "monetize-example"
sampled_requests_enabled = true
}
}
References
Would you like to implement the enhancement?
Yes.
Description
AWS WAF now supports charging for a web request natively — a new per-rule
Monetizeaction (alongside the existingAllow/Block/Count/Captcha/Challenge) together with a WebACL-level monetization configuration.This enables pay-per-request / AI-traffic monetization (x402-style HTTP 402
"Payment Required" challenges) directly at the edge, without Lambda@Edge.
The provider's
wafv2ruleactionblock andaws_wafv2_web_aclschema do notyet expose this. I'd like to add support.
Announcement: https://aws.amazon.com/blogs/aws/aws-waf-adds-ai-traffic-monetization-capability-to-help-content-owners-charge-ai-bots-for-content-access/ (2026-06-15 (GA))
I'm planning to implement this myself. The live
wafv2API already accepts aMonetizerule action (verified viaCheckCapacity); the remaining dependencyis the
aws-sdk-go-v2/service/wafv2release carrying theMonetizeshape andWebACL
MonetizationConfig. If the SDK shape is available I'll open a completePR; otherwise I'll open it as a draft and finalize on the SDK bump.
Affected Resource(s) or Data Source(s)
aws_wafv2_web_aclaws_wafv2_rule_groupaws_wafv2_web_acl(data source)aws_wafv2_rule_group(data source)Potential Terraform Configuration
References
Action: { Monetize: { PriceMultiplier } }and WebACL-level
MonetizationConfig { CryptoConfig { PaymentNetworks[] { Chain, WalletAddress, Prices[] { Amount, Currency } } }, CurrencyMode }.Would you like to implement the enhancement?
Yes.