WAFv2 Web ACL Deployer
An AWS CloudOps agent skill that provisions AWS WAFv2 Web ACLs
with correct production defaults. The skill walks the operator
through a 9-step provisioning procedure, explains why each
default matters, and emits a READY_TO_DEPLOY checklist verifying
every configuration item.
Quick navigation
| Need |
Section |
| What MUST be in the response |
"STRICT output contract" |
| Why the provisioning order matters |
"Reasoning framework" |
| What to verify before provisioning |
"Prerequisites" |
| The ordered provisioning steps |
"Deployment procedure" |
| Common silent-failure pitfalls |
"NEVER" |
| Choosing scope, rules, actions |
"Expert heuristic" |
| Workload-specific defaults |
"Workload matrix" |
| 2024-2026 feature changes |
"Recent AWS features" |
| Deep CLI sequences |
references/deployment-cli-commands.md |
| Managed rules, logging, ATP, CAPTCHA |
references/managed-rules-and-logging-guide.md |
Activation keywords
create WAF Web ACL, WAFv2 Web ACL, managed rule groups,
AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet,
WindowsRuleSet, IPReputationList, BotControlRuleSet,
AmazonIpReputationList, ATP rule groups, account takeover
prevention, WAF rate-based rule, WAF rate limiting,
WAF logging, Kinesis Firehose WAF, CloudWatch Logs WAF,
S3 WAF logging, WAF CAPTCHA action, WAF Challenge action,
WAF custom rules, WAF IP set, WAF regex pattern set,
WAF geo match, WAF byte match, WAF size constraint,
CLOUDFRONT scope, REGIONAL scope, ALB WAF association,
API Gateway WAF, CloudFront WAF.
STRICT output contract
When this skill is invoked with a WAFv2 Web ACL provisioning
request (Web ACL name, scope, rule groups, or a partial existing
configuration), the agent MUST respond with the READY_TO_DEPLOY
checklist defined in "Output format" using the literal all-caps
labels ACL:, VERDICT:, CHECKLIST:, and
VERIFICATION_COMMANDS:. Do NOT preface the checklist with prose,
headings, or disclaimers — emit the block as the first lines of
the response.
Required output structure
ACL: <web-acl-name> — the Web ACL being provisioned.
VERDICT: READY_TO_DEPLOY OR VERDICT: PREREQUISITES_MISSING —
nothing else.
CHECKLIST: followed by indented lines, each prefixed with a
status marker ([✓], [✗], [OPTIONAL], [INPUT NEEDED]).
VERIFICATION_COMMANDS: followed by indented aws wafv2 ...
commands the operator can run.
6 FORBIDDEN output patterns (each silently breaks automation)
- FORBIDDEN — prose preamble before
ACL:. The first
non-empty line MUST be ACL:. No "Here is your checklist…".
- FORBIDDEN — markdown variants of the labels. Write
VERDICT:, not **VERDICT:**, ### Verdict, Verdict =, or
\VERDICT``. The labels are case-sensitive all-caps keywords.
- FORBIDDEN — swapping verdict tokens. The verdict is exactly
READY_TO_DEPLOY or PREREQUISITES_MISSING — not "ready",
"missing", "BLOCKED", "OK", or "needs review".
- FORBIDDEN — omitting
VERIFICATION_COMMANDS:. Even when
the verdict is PREREQUISITES_MISSING, include the commands
the operator needs to verify the gaps.
- FORBIDDEN — extra sections after
VERIFICATION_COMMANDS:.
The checklist block is the entire response. Put deeper
explanation in references/ files, not after the block.
- FORBIDDEN — status marker drift. Use only
[✓], [✗],
[OPTIONAL], [INPUT NEEDED]. Do not invent [?], [!],
[WARN], or emoji markers.
Perfect example (copy the shape exactly)
ACL: payments-api-waf
VERDICT: READY_TO_DEPLOY
CHECKLIST:
[✓] Scope — REGIONAL (us-east-1)
[✓] Default action — Allow
[✓] Managed rules — AWSManagedRulesCommonRuleSet (priority 10), AWSManagedRulesSQLiRuleSet (priority 20)
[✓] Custom rule — block IP set 10.0.0.0/8 (priority 1, ByteMatch + IPSet)
[✓] Rate-based rule — 2000 req / 5 min, aggregate on IP (priority 5)
[✓] Visibility config — CloudWatch metrics enabled, sampled requests enabled
[✓] Logging — Kinesis Firehose delivery stream aws-waf-logs-payments
[✓] Association — arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/payments-alb/50dc6c495c0c9188
[✓] Tags — Environment=production, Application=payments
[OPTIONAL] CAPTCHA / Challenge — none for this workload
[OPTIONAL] Bot Control — not enabled (enable for public-facing forms)
VERIFICATION_COMMANDS:
aws wafv2 list-web-acls --scope REGIONAL --region us-east-1
aws wafv2 get-web-acl --scope REGIONAL --id <web-acl-id> --region us-east-1
aws wafv2 list-resources-for-web-acl --web-acl-arn <web-acl-arn> --region us-east-1
aws wafv2 get-logging-configuration --web-acl-arn <web-acl-arn> --region us-east-1
Reasoning framework (why the provisioning order matters)
WAFv2 provisioning has scope, dependency, and ordering
constraints that make the procedure non-trivial:
Scope FIRST — CLOUDFRONT vs REGIONAL is immutable. A
CLOUDFRONT-scope Web ACL lives in us-east-1 and attaches only
to CloudFront distributions. A REGIONAL-scope Web ACL lives in
a specific Region and attaches to ALBs, API Gateway REST/HTTP
APIs, AppSync GraphQL APIs, Cognito user pools, and App Runner.
The scope CANNOT be changed after creation — you must delete
and recreate.
Default action — Allow vs Block. The default action applies
to any request that does not match a rule with a terminating
action. Allow is the common default (rules block threats);
Block is used for allow-list patterns (rules allow known-good).
Rule priority — lower numbers evaluate first. WAF evaluates
rules in priority order (0 is highest). The first rule that
matches a request with a terminating action (Allow, Block,
CAPTCHA, Challenge) wins. Gaps in priority numbering let you
insert rules later without renumbering.
Allow-list rules BEFORE managed rule groups. Put explicit
allows (partner IPs, known-good paths) at the highest priority
(lowest numbers) so they win over managed rule blocks. Place
workload-specific blocks (geo, size) after managed rules so
managed rules catch generic threats first.
Rate-based rules — aggregate key choice matters. A
rate-based rule counts requests per aggregate key value over a
5-minute window. Use IP for direct connections and
FORWARDED_IP (reads X-Forwarded-For) when behind a CDN, ALB,
or proxy. Mis-choosing the key rate-limits the CDN node, not
the client.
Logging — destination must exist before WAF can write. The
Firehose delivery stream, CloudWatch Logs log group, or S3
bucket MUST exist and have a service principal policy permitting
delivery.logs.amazonaws.com. WAF silently drops logs if the
destination is missing or the policy is wrong.
CAPTCHA and Challenge — non-terminating bot defense actions.
CAPTCHA requires the client to solve a CAPTCHA token;
Challenge runs a silent browser challenge. Both issue tokens
valid for ~300 seconds. ATP (Account Takeover Prevention) is a
managed rule group requiring a per-Region ARN and exact login
path configuration.
Prerequisites (verify before deployment)
| Prerequisite |
Why it matters |
How to verify |
| Scope decision |
Immutable after creation. CLOUDFRONT = us-east-1 + CloudFront only. REGIONAL = one Region + ALB/API Gateway/AppSync/Cognito/App Runner. |
Confirm target resource type |
| Target resource ARN |
The Web ACL must attach to an existing resource (CloudFront dist, ALB ARN, API Gateway stage ARN, AppSync API ARN, Cognito pool ARN, App Runner ARN). |
aws elbv2 describe-load-balancers / aws apigateway get-rest-apis / aws cloudfront get-distribution |
| Logging destination |
Firehose stream name, CloudWatch log group ARN, or S3 bucket ARN. The destination's resource policy MUST allow delivery.logs.amazonaws.com. |
aws firehose describe-delivery-stream / aws logs describe-log-groups / aws s3api get-bucket-policy |
| IP set / regex pattern set |
Custom rules referencing these by ARN require they exist BEFORE the Web ACL is created (ARN is validated at creation). |
aws wafv2 list-ip-sets --scope <scope> --region <region> |
| Managed rule group availability |
ATP and Bot Control are subscription-managed. The account must subscribe via Marketplace before referencing them. |
aws wafv2 list-available-managed-rule-groups --scope <scope> |
| IAM permissions |
Caller needs wafv2:CreateWebACL, wafv2:AssociateWebACL, wafv2:PutLoggingConfiguration, plus resource-specific (elasticloadbalancing:SetWebACL, apigateway:SetWebACL, cloudfront:UpdateDistribution). |
aws sts get-caller-identity |
Deployment procedure (apply in order)
Step 1: Scope selection (CLOUDFRONT vs REGIONAL)
| Scope |
Region |
Target resources |
Notes |
CLOUDFRONT |
us-east-1 (always) |
CloudFront distributions only |
Global edge protection. Created in us-east-1 even if origin is elsewhere. |
REGIONAL |
any commercial Region |
ALB, API Gateway REST/HTTP, AppSync, Cognito, App Runner |
One ACL per Region. Replicate per Region for multi-Region. |
Decision rule: use CLOUDFRONT scope if and only if attaching
to CloudFront. Everything else uses REGIONAL.
Step 2: Default action (Allow vs Block)
- Allow (common) — requests matching no rule are allowed.
Rules block threats.
- Block — requests matching no rule are blocked. Used for
allow-list patterns where a custom rule explicitly allows known
traffic.
For public workloads, default to Allow and let managed rules
block threats. Use Block only for allow-listed internal APIs.
Step 3: Managed rule groups
Managed rule groups are curated by AWS and AWS Marketplace sellers.
They are versioned — pin a version for stability, or use
AGENTIC versioning (auto-update) for hands-off maintenance.
Managed/subscription rule group tables moved verbatim to managed-rules-and-logging-guide.md.
Load on demand when selecting rule groups in Step 3.
Step 4: Custom rules
Custom rules use WAF statement types: ByteMatchStatement,
IPSetReferenceStatement, RegexPatternSetReferenceStatement,
GeoMatchStatement, SizeConstraintStatement, RateBasedStatement,
AndStatement, OrStatement, NotStatement, LabelMatchStatement.
Common patterns:
| Pattern |
Statement |
Example |
| Block a specific path |
ByteMatchStatement on URIPath |
Block /admin/* from non-corporate IPs |
| Allow partner IPs |
IPSetReferenceStatement |
Allow 203.0.113.0/24 to bypass managed rules |
| Block a country |
GeoMatchStatement |
Block RU,KP,IR from login endpoint |
| Block oversized payloads |
SizeConstraintStatement on Body |
Block bodies > 8 KB on /api/v1/upload |
| Block a regex |
RegexPatternSetReferenceStatement |
Block (?i)(union.*select) |
| Rate limit |
RateBasedStatement |
2000 req / 5 min per IP on /api/* |
Action types: Allow, Block, Count, CAPTCHA, Challenge.
Use Count first to measure rule impact before switching to Block.
Step 5: Rule priority ordering
WAF evaluates rules in ascending priority order. The first rule
that matches with a terminating action wins. Count is
non-terminating — it increments a counter and continues evaluation.
Recommended priority layout:
| Priority |
Rule |
Why |
| 0 |
Allow: partner IPs / corporate CIDR |
Allow-list wins first so managed rules don't block partners |
| 1-9 |
Custom allow rules (specific paths, headers) |
Explicit allows before managed blocks |
| 10 |
AWSManagedRulesCommonRuleSet |
Core protection |
| 20-90 |
Other AWS managed rule sets |
In threat-class order (SQLi, Linux, Windows, etc.) |
| 100-110 |
IP reputation lists |
After signature rules |
| 200+ |
Bot Control, ATP, ACFP |
Subscription rules; most expensive per-request |
| 1000+ |
Custom blocks (URI, geo, size) |
Workload-specific blocks last |
| 5000+ |
Rate-based rules |
Rate limiting after threat blocking |
Gaps (10, 20, 30...) let you insert rules without renumbering.
WAF requires unique priorities within a Web ACL.
Step 6: Rate-based rules
A rate-based rule counts requests per aggregate key value over a
rolling 5-minute window. When the count exceeds the limit, the
action fires for the remainder of the window.
Rate-based rule JSON example moved verbatim to worked-examples.md.
Load on demand when authoring a RateBasedStatement rule.
Aggregate key table and FORWARDED_IP config moved verbatim to managed-rules-and-logging-guide.md.
Load on demand when choosing a rate aggregate key in Step 6.
NEVER use IP aggregate key behind a CDN or proxy. All
traffic shares the CDN egress IP — the rule rate-limits the CDN
node, not the abusive client. Use FORWARDED_IP.
Step 7: Logging
WAF sends full request logs (timestamp, terminating rule, action,
client IP, URI, headers, labels) to one of three destinations.
| Destination |
Setup |
Notes |
| Kinesis Firehose |
Create delivery stream named aws-waf-logs-<name> (prefix required). Firehose writes to S3. |
Recommended default — buffers and batches. |
| CloudWatch Logs |
Log group ARN with resource policy permitting delivery.logs.amazonaws.com:PutLogEvents. |
Easiest for low-volume alerting and Insights queries. |
| S3 (via Firehose) |
Firehose delivers to S3. S3 bucket policy must allow delivery.logs.amazonaws.com. |
Firehose is the intermediary — WAF does not write to S3 directly. |
put-logging-configuration CLI moved verbatim to deployment-cli-commands.md.
Load on demand when enabling logging in Step 7.
CloudWatch Logs resource policy JSON moved verbatim to managed-rules-and-logging-guide.md.
Load on demand when logging to CloudWatch Logs.
Step 8: Association with ALB / API Gateway / CloudFront
ALB / API Gateway / CloudFront association CLI moved verbatim to deployment-cli-commands.md.
Load on demand when associating in Step 8.
A Web ACL can associate with multiple resources (one ACL per
resource). CloudFront allows only one Web ACL per distribution.
Step 9: CAPTCHA and Challenge actions
CAPTCHA/Challenge semantics moved verbatim to managed-rules-and-logging-guide.md.
Load on demand when deciding CAPTCHA vs Challenge.
CAPTCHA rule JSON moved verbatim to worked-examples.md.
Load on demand when adding CAPTCHA in Step 9.
Integration SDK: the client-side aws-waf JavaScript SDK
captures the token and attaches it to subsequent requests. The
SDK is specific to each Web ACL — copy the integration snippet
from the console or API.
ATP rule group config moved verbatim to managed-rules-and-logging-guide.md.
Load on demand when configuring ATP login protection.
Visibility config
Every rule and the Web ACL itself require a VisibilityConfig:
{
"SampledRequestsEnabled": true,
"CloudWatchMetricsEnabled": true,
"MetricName": "<unique-metric-name>"
}
SampledRequestsEnabled: true — retains up to 100 sampled
requests per rule per 5-minute window for debugging.
CloudWatchMetricsEnabled: true — emits a CloudWatch metric per
rule (AWS/WAFV2 namespace for regional, AWS/CloudFront for
CloudFront scope).
MetricName — must be unique within the Web ACL.
ALWAYS enable both. The metrics are free; sampled requests are
essential for debugging rule matches.
Workload matrix
| Workload |
Scope |
Managed rules |
Custom rules |
Rate limit |
CAPTCHA/Challenge |
| Public web app behind CloudFront |
CLOUDFRONT |
Common, SQLi, Bot Control, IP Reputation |
Geo-block, URI allow-list |
FORWARDED_IP on /api/* |
Challenge on /search, /login |
| ALB-hosted API |
REGIONAL |
Common, SQLi, KnownBadInputs |
IP-set allow-list, size constraint |
IP on /api/* |
None |
| API Gateway REST API |
REGIONAL |
Common, SQLi, Linux |
API-key header check |
FORWARDED_IP on all |
None |
| Login endpoint |
REGIONAL |
Common, SQLi, ATP |
None |
IP on /login |
CAPTCHA on /login |
| Signup form |
REGIONAL |
Common, SQLi, ACFP |
Email domain check |
FORWARDED_IP on /signup |
CAPTCHA on /signup |
| Internal admin API |
REGIONAL |
Common |
Allow corporate CIDR only, block all else |
None |
None |
Recent AWS features (2024-2026)
Recent AWS features moved verbatim to advanced-patterns.md.
Load on demand for 2024-2026 capability checks.
NEVER (anti-patterns)
NEVER create a CLOUDFRONT-scope Web ACL to protect an ALB or API
Gateway. Scope is immutable. CLOUDFRONT scope attaches only to
CloudFront distributions; REGIONAL scope attaches to ALB, API
Gateway, AppSync, Cognito, App Runner. Wrong scope = silent
association failure.
NEVER put managed rule groups at priority 0 when you have
allow-list rules. A partner IP that should bypass managed rules
gets blocked because the managed rule evaluated first. Put
allow-list rules at the lowest priorities (0-9) so they win.
NEVER enable a Block action on a new rule without first running
it in Count mode. Run Count for 1-2 weeks, inspect sampled
requests for false positives, then switch to Block. Direct Block
on an untested rule risks blocking legitimate users.
NEVER use IP aggregate key for a rate-based rule when traffic
arrives via a CDN, ALB, or proxy. All clients share the CDN
egress IP; the rule rate-limits the CDN node, not the abusive
client. Use FORWARDED_IP with X-Forwarded-For.
NEVER enable logging without first verifying the destination's
resource policy. A missing or mis-scoped policy on the Firehose
delivery stream, CloudWatch Logs log group, or S3 bucket causes
WAF to silently drop logs — there is no error, just missing data.
NEVER assume a Web ACL takes effect immediately on CloudFront.
Distribution updates propagate over several minutes. For ALB/API
Gateway, the WAF association takes effect within ~60 seconds.
NEVER configure ATP without specifying the exact LoginPath,
UsernameField, and PasswordField. Without the field
identifiers ATP cannot match, and the rule silently does nothing.
NEVER omit VisibilityConfig on any rule. Without metrics and
sampled requests, you cannot debug why a rule matched.
NEVER deviate from the checklist output format. Substituting
Verdict / **VERDICT** / ### Verdict: for the literal
VERDICT: label silently breaks downstream deployment pipelines
and assertion-based evals.
Expert heuristic — choosing scope, rules, and actions
Full heuristic detail moved verbatim to advanced-patterns.md.
Load on demand when choosing scope, rules, actions, rate keys, or logging.
Pre-flight safety checks (run before any provisioning CLI)
Pre-flight CLI checks moved verbatim to diagnostic-commands.md.
Load on demand before running any provisioning CLI.
Output format — MANDATORY literal labels
When invoked with a Web ACL provisioning request, your ENTIRE
response MUST be the checklist block below. The labels are
case-sensitive all-caps keywords — write them EXACTLY as
shown. Do NOT write a preamble. Start with ACL: and stop after
the VERIFICATION_COMMANDS: block.
ACL: <web-acl-name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
[✓] Scope — <CLOUDFRONT | REGIONAL> (<region>)
[✓] Default action — <Allow | Block>
[✓] Managed rules — <rule-group-name (priority N), ...>
[✓] Custom rules — <rule-name (priority N, statement, action), ...>
[✓] Rate-based rules — <limit> req/5min, aggregate key <IP | FORWARDED_IP | URI | ...>
[✓] Visibility config — CloudWatch metrics enabled, sampled requests enabled
[✓] Logging — <Firehose stream | CloudWatch log group | S3 bucket | none>
[✓] Association — <resource-arn | pending>
[✓] Tags — <key=value pairs>
[OPTIONAL] CAPTCHA / Challenge — <rule-name (action) | none>
[OPTIONAL] Bot Control / ATP / ACFP — <rule-group-name | not enabled>
VERIFICATION_COMMANDS:
aws wafv2 list-web-acls --scope <scope> --region <region>
aws wafv2 get-web-acl --scope <scope> --id <web-acl-id> --region <region>
aws wafv2 list-resources-for-web-acl --web-acl-arn <web-acl-arn> --region <region>
aws wafv2 get-logging-configuration --web-acl-arn <web-acl-arn> --region <region>
Status marker semantics:
[✓] — configuration is applied and verified.
[✗] — configuration is NOT applied or is misconfigured. Cite
the gap.
[OPTIONAL] — recommended but not required for the workload type.
[INPUT NEEDED] — a prerequisite value is missing (target
resource ARN, logging destination, IP set ARN) and the operator
must provide it before provisioning can proceed.
PREREQUISITES_MISSING verdict: if any REQUIRED prerequisite is
missing (target resource ARN for association, logging destination
when logging is requested, IP set ARN when referenced by a custom
rule), the verdict is PREREQUISITES_MISSING with each gap listed.
The checklist shows the target configuration with [INPUT NEEDED]
or [✗] for unmet prerequisites.
Edge-case handling
Edge-case catalog moved verbatim to advanced-patterns.md.
Load on demand when a deployed ACL misbehaves.
References (load on demand)
- worked-examples.md - secondary examples: rate-based rule JSON, CAPTCHA rule JSON
- diagnostic-commands.md - pre-flight safety check CLI
- advanced-patterns.md - expert heuristic detail, edge cases, recent AWS features
- deployment-cli-commands.md - full 9-step CLI sequences, logging and association CLI
- managed-rules-and-logging-guide.md - rule group tables, ATP config, aggregate keys, logging policies
Domain
AWS CloudOps / WAFv2 Web Application Firewall Provisioning.
AWS documentation
References
references/deployment-cli-commands.md — full copy-pasteable CLI
command sequence for all 9 provisioning steps, including Web ACL
creation, managed rule group attachment, custom rules, rate-based
rules, logging configuration, ALB / API Gateway / CloudFront
association, CAPTCHA / Challenge rules, and Terraform
aws_wafv2_web_acl / aws_wafv2_web_acl_association /
aws_wafv2_ip_set / aws_wafv2_regex_pattern_set resource
equivalents.
references/managed-rules-and-logging-guide.md — deep reference
on managed rule group internals (Common, SQLi, Bot Control, ATP,
ACFP, IP Reputation), WCU costs, versioning, scope-down
statements, logging destination resource policies, CAPTCHA /
Challenge token lifecycle, and aggregate key selection.
1---2name: wafv2-web-acl-deployer3description: 'Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB/API Gateway/CloudFront, or configuring CAPTCHA/Challenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.'4license: Apache-2.05compatibility: 'Requires an LLM agent runtime (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with wafv2, cloudfront, elasticloadbalancingv2, apigateway, firehose, logs, and s3 access. Works with Terraform aws_wafv2_web_acl / aws_wafv2_web_acl_association resources, CloudFormation AWS::WAFv2::WebACL / AWS::WAFv2::WebACLAssociation, and SAM templates.'6metadata:7 source: https://skillmd.com/skills/jhkchan/wafv2-web-acl-deployer8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '1'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Security15 task_type: deploy16 skill_class: capability17 lifecycle_status: active18 verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 tags: aws, waf, wafv2, security, cloudops, deploy, web-acl, managed-rules, rate-limiting22 dependencies: aws-orchestrator23 keywords: aws, waf, wafv2, security, cloudops, deploy, provisioning, web-acl, managed-rules, rate-limiting, bot-control, captcha, challenge, atp, cloudfront, regional24 when_to_use: Invoke when the user wants to create a new WAFv2 Web ACL, attach AWS managed rule groups, configure custom rules (byte match, IP set, regex, geo, size, rate-based), enable WAF logging to Kinesis Firehose / CloudWatch Logs / S3, associate a Web ACL with an ALB / API Gateway / CloudFront distribution, or configure CAPTCHA / Challenge actions for bot defense. Do NOT invoke for AWS WAF Classic (waf-regional / waf) — only WAFv2. For Shield Advanced protections, use the shield-advanced skill.25---2627# WAFv2 Web ACL Deployer2829An AWS CloudOps agent skill that provisions AWS WAFv2 Web ACLs30with correct production defaults. The skill walks the operator31through a 9-step provisioning procedure, explains why each32default matters, and emits a READY_TO_DEPLOY checklist verifying33every configuration item.3435## Quick navigation3637| Need | Section |38|---|---|39| What MUST be in the response | "STRICT output contract" |40| Why the provisioning order matters | "Reasoning framework" |41| What to verify before provisioning | "Prerequisites" |42| The ordered provisioning steps | "Deployment procedure" |43| Common silent-failure pitfalls | "NEVER" |44| Choosing scope, rules, actions | "Expert heuristic" |45| Workload-specific defaults | "Workload matrix" |46| 2024-2026 feature changes | "Recent AWS features" |47| Deep CLI sequences | `references/deployment-cli-commands.md` |48| Managed rules, logging, ATP, CAPTCHA | `references/managed-rules-and-logging-guide.md` |4950## Activation keywords5152create WAF Web ACL, WAFv2 Web ACL, managed rule groups,53AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet,54WindowsRuleSet, IPReputationList, BotControlRuleSet,55AmazonIpReputationList, ATP rule groups, account takeover56prevention, WAF rate-based rule, WAF rate limiting,57WAF logging, Kinesis Firehose WAF, CloudWatch Logs WAF,58S3 WAF logging, WAF CAPTCHA action, WAF Challenge action,59WAF custom rules, WAF IP set, WAF regex pattern set,60WAF geo match, WAF byte match, WAF size constraint,61CLOUDFRONT scope, REGIONAL scope, ALB WAF association,62API Gateway WAF, CloudFront WAF.6364## STRICT output contract6566When this skill is invoked with a WAFv2 Web ACL provisioning67request (Web ACL name, scope, rule groups, or a partial existing68configuration), the agent MUST respond with the READY_TO_DEPLOY69checklist defined in "Output format" using the literal all-caps70labels `ACL:`, `VERDICT:`, `CHECKLIST:`, and71`VERIFICATION_COMMANDS:`. Do NOT preface the checklist with prose,72headings, or disclaimers — emit the block as the first lines of73the response.7475### Required output structure76771. `ACL: <web-acl-name>` — the Web ACL being provisioned.782. `VERDICT: READY_TO_DEPLOY` OR `VERDICT: PREREQUISITES_MISSING` —79 nothing else.803. `CHECKLIST:` followed by indented lines, each prefixed with a81 status marker (`[✓]`, `[✗]`, `[OPTIONAL]`, `[INPUT NEEDED]`).824. `VERIFICATION_COMMANDS:` followed by indented `aws wafv2 ...`83 commands the operator can run.8485### 6 FORBIDDEN output patterns (each silently breaks automation)86871. **FORBIDDEN — prose preamble before `ACL:`.** The first88 non-empty line MUST be `ACL:`. No "Here is your checklist…".892. **FORBIDDEN — markdown variants of the labels.** Write90 `VERDICT:`, not `**VERDICT:**`, `### Verdict`, `Verdict =`, or91 `\`VERDICT\``. The labels are case-sensitive all-caps keywords.923. **FORBIDDEN — swapping verdict tokens.** The verdict is exactly93 `READY_TO_DEPLOY` or `PREREQUISITES_MISSING` — not "ready",94 "missing", "BLOCKED", "OK", or "needs review".954. **FORBIDDEN — omitting `VERIFICATION_COMMANDS:`.** Even when96 the verdict is `PREREQUISITES_MISSING`, include the commands97 the operator needs to verify the gaps.985. **FORBIDDEN — extra sections after `VERIFICATION_COMMANDS:`.**99 The checklist block is the entire response. Put deeper100 explanation in `references/` files, not after the block.1016. **FORBIDDEN — status marker drift.** Use only `[✓]`, `[✗]`,102 `[OPTIONAL]`, `[INPUT NEEDED]`. Do not invent `[?]`, `[!]`,103 `[WARN]`, or emoji markers.104105### Perfect example (copy the shape exactly)106107```text108ACL: payments-api-waf109VERDICT: READY_TO_DEPLOY110CHECKLIST:111 [✓] Scope — REGIONAL (us-east-1)112 [✓] Default action — Allow113 [✓] Managed rules — AWSManagedRulesCommonRuleSet (priority 10), AWSManagedRulesSQLiRuleSet (priority 20)114 [✓] Custom rule — block IP set 10.0.0.0/8 (priority 1, ByteMatch + IPSet)115 [✓] Rate-based rule — 2000 req / 5 min, aggregate on IP (priority 5)116 [✓] Visibility config — CloudWatch metrics enabled, sampled requests enabled117 [✓] Logging — Kinesis Firehose delivery stream aws-waf-logs-payments118 [✓] Association — arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/payments-alb/50dc6c495c0c9188119 [✓] Tags — Environment=production, Application=payments120 [OPTIONAL] CAPTCHA / Challenge — none for this workload121 [OPTIONAL] Bot Control — not enabled (enable for public-facing forms)122VERIFICATION_COMMANDS:123 aws wafv2 list-web-acls --scope REGIONAL --region us-east-1124 aws wafv2 get-web-acl --scope REGIONAL --id <web-acl-id> --region us-east-1125 aws wafv2 list-resources-for-web-acl --web-acl-arn <web-acl-arn> --region us-east-1126 aws wafv2 get-logging-configuration --web-acl-arn <web-acl-arn> --region us-east-1127```128129## Reasoning framework (why the provisioning order matters)130131WAFv2 provisioning has **scope, dependency, and ordering132constraints** that make the procedure non-trivial:1331341. **Scope FIRST — CLOUDFRONT vs REGIONAL is immutable.** A135 CLOUDFRONT-scope Web ACL lives in us-east-1 and attaches only136 to CloudFront distributions. A REGIONAL-scope Web ACL lives in137 a specific Region and attaches to ALBs, API Gateway REST/HTTP138 APIs, AppSync GraphQL APIs, Cognito user pools, and App Runner.139 The scope CANNOT be changed after creation — you must delete140 and recreate.1411422. **Default action — Allow vs Block.** The default action applies143 to any request that does not match a rule with a terminating144 action. `Allow` is the common default (rules block threats);145 `Block` is used for allow-list patterns (rules allow known-good).1461473. **Rule priority — lower numbers evaluate first.** WAF evaluates148 rules in priority order (0 is highest). The first rule that149 matches a request with a terminating action (Allow, Block,150 CAPTCHA, Challenge) wins. Gaps in priority numbering let you151 insert rules later without renumbering.1521534. **Allow-list rules BEFORE managed rule groups.** Put explicit154 allows (partner IPs, known-good paths) at the highest priority155 (lowest numbers) so they win over managed rule blocks. Place156 workload-specific blocks (geo, size) after managed rules so157 managed rules catch generic threats first.1581595. **Rate-based rules — aggregate key choice matters.** A160 rate-based rule counts requests per aggregate key value over a161 5-minute window. Use `IP` for direct connections and162 `FORWARDED_IP` (reads `X-Forwarded-For`) when behind a CDN, ALB,163 or proxy. Mis-choosing the key rate-limits the CDN node, not164 the client.1651666. **Logging — destination must exist before WAF can write.** The167 Firehose delivery stream, CloudWatch Logs log group, or S3168 bucket MUST exist and have a service principal policy permitting169 `delivery.logs.amazonaws.com`. WAF silently drops logs if the170 destination is missing or the policy is wrong.1711727. **CAPTCHA and Challenge — non-terminating bot defense actions.**173 `CAPTCHA` requires the client to solve a CAPTCHA token;174 `Challenge` runs a silent browser challenge. Both issue tokens175 valid for ~300 seconds. ATP (Account Takeover Prevention) is a176 managed rule group requiring a per-Region ARN and exact login177 path configuration.178179## Prerequisites (verify before deployment)180181| Prerequisite | Why it matters | How to verify |182|---|---|---|183| **Scope decision** | Immutable after creation. CLOUDFRONT = us-east-1 + CloudFront only. REGIONAL = one Region + ALB/API Gateway/AppSync/Cognito/App Runner. | Confirm target resource type |184| **Target resource ARN** | The Web ACL must attach to an existing resource (CloudFront dist, ALB ARN, API Gateway stage ARN, AppSync API ARN, Cognito pool ARN, App Runner ARN). | `aws elbv2 describe-load-balancers` / `aws apigateway get-rest-apis` / `aws cloudfront get-distribution` |185| **Logging destination** | Firehose stream name, CloudWatch log group ARN, or S3 bucket ARN. The destination's resource policy MUST allow `delivery.logs.amazonaws.com`. | `aws firehose describe-delivery-stream` / `aws logs describe-log-groups` / `aws s3api get-bucket-policy` |186| **IP set / regex pattern set** | Custom rules referencing these by ARN require they exist BEFORE the Web ACL is created (ARN is validated at creation). | `aws wafv2 list-ip-sets --scope <scope> --region <region>` |187| **Managed rule group availability** | ATP and Bot Control are subscription-managed. The account must subscribe via Marketplace before referencing them. | `aws wafv2 list-available-managed-rule-groups --scope <scope>` |188| **IAM permissions** | Caller needs `wafv2:CreateWebACL`, `wafv2:AssociateWebACL`, `wafv2:PutLoggingConfiguration`, plus resource-specific (`elasticloadbalancing:SetWebACL`, `apigateway:SetWebACL`, `cloudfront:UpdateDistribution`). | `aws sts get-caller-identity` |189190## Deployment procedure (apply in order)191192### Step 1: Scope selection (CLOUDFRONT vs REGIONAL)193194| Scope | Region | Target resources | Notes |195|---|---|---|---|196| `CLOUDFRONT` | us-east-1 (always) | CloudFront distributions only | Global edge protection. Created in us-east-1 even if origin is elsewhere. |197| `REGIONAL` | any commercial Region | ALB, API Gateway REST/HTTP, AppSync, Cognito, App Runner | One ACL per Region. Replicate per Region for multi-Region. |198199**Decision rule:** use CLOUDFRONT scope if and only if attaching200to CloudFront. Everything else uses REGIONAL.201202### Step 2: Default action (Allow vs Block)203204- **Allow** (common) — requests matching no rule are allowed.205 Rules block threats.206- **Block** — requests matching no rule are blocked. Used for207 allow-list patterns where a custom rule explicitly allows known208 traffic.209210For public workloads, default to **Allow** and let managed rules211block threats. Use Block only for allow-listed internal APIs.212213### Step 3: Managed rule groups214215Managed rule groups are curated by AWS and AWS Marketplace sellers.216They are versioned — pin a version for stability, or use217`AGENTIC` versioning (auto-update) for hands-off maintenance.218219Managed/subscription rule group tables moved verbatim to [managed-rules-and-logging-guide.md](references/managed-rules-and-logging-guide.md).220Load on demand when selecting rule groups in Step 3.221222### Step 4: Custom rules223224Custom rules use WAF statement types: `ByteMatchStatement`,225`IPSetReferenceStatement`, `RegexPatternSetReferenceStatement`,226`GeoMatchStatement`, `SizeConstraintStatement`, `RateBasedStatement`,227`AndStatement`, `OrStatement`, `NotStatement`, `LabelMatchStatement`.228229**Common patterns:**230231| Pattern | Statement | Example |232|---|---|---|233| Block a specific path | `ByteMatchStatement` on `URIPath` | Block `/admin/*` from non-corporate IPs |234| Allow partner IPs | `IPSetReferenceStatement` | Allow 203.0.113.0/24 to bypass managed rules |235| Block a country | `GeoMatchStatement` | Block `RU,KP,IR` from login endpoint |236| Block oversized payloads | `SizeConstraintStatement` on `Body` | Block bodies > 8 KB on `/api/v1/upload` |237| Block a regex | `RegexPatternSetReferenceStatement` | Block `(?i)(union.*select)` |238| Rate limit | `RateBasedStatement` | 2000 req / 5 min per IP on `/api/*` |239240**Action types:** `Allow`, `Block`, `Count`, `CAPTCHA`, `Challenge`.241Use `Count` first to measure rule impact before switching to Block.242243### Step 5: Rule priority ordering244245WAF evaluates rules in ascending priority order. The first rule246that matches with a terminating action wins. `Count` is247non-terminating — it increments a counter and continues evaluation.248249**Recommended priority layout:**250251| Priority | Rule | Why |252|---|---|---|253| 0 | Allow: partner IPs / corporate CIDR | Allow-list wins first so managed rules don't block partners |254| 1-9 | Custom allow rules (specific paths, headers) | Explicit allows before managed blocks |255| 10 | `AWSManagedRulesCommonRuleSet` | Core protection |256| 20-90 | Other AWS managed rule sets | In threat-class order (SQLi, Linux, Windows, etc.) |257| 100-110 | IP reputation lists | After signature rules |258| 200+ | Bot Control, ATP, ACFP | Subscription rules; most expensive per-request |259| 1000+ | Custom blocks (URI, geo, size) | Workload-specific blocks last |260| 5000+ | Rate-based rules | Rate limiting after threat blocking |261262Gaps (10, 20, 30...) let you insert rules without renumbering.263WAF requires unique priorities within a Web ACL.264265### Step 6: Rate-based rules266267A rate-based rule counts requests per aggregate key value over a268rolling 5-minute window. When the count exceeds the limit, the269action fires for the remainder of the window.270271Rate-based rule JSON example moved verbatim to [worked-examples.md](references/worked-examples.md).272Load on demand when authoring a RateBasedStatement rule.273274Aggregate key table and FORWARDED_IP config moved verbatim to [managed-rules-and-logging-guide.md](references/managed-rules-and-logging-guide.md).275Load on demand when choosing a rate aggregate key in Step 6.276277**NEVER use `IP` aggregate key behind a CDN or proxy.** All278traffic shares the CDN egress IP — the rule rate-limits the CDN279node, not the abusive client. Use `FORWARDED_IP`.280281### Step 7: Logging282283WAF sends full request logs (timestamp, terminating rule, action,284client IP, URI, headers, labels) to one of three destinations.285286| Destination | Setup | Notes |287|---|---|---|288| **Kinesis Firehose** | Create delivery stream named `aws-waf-logs-<name>` (prefix required). Firehose writes to S3. | Recommended default — buffers and batches. |289| **CloudWatch Logs** | Log group ARN with resource policy permitting `delivery.logs.amazonaws.com:PutLogEvents`. | Easiest for low-volume alerting and Insights queries. |290| **S3** (via Firehose) | Firehose delivers to S3. S3 bucket policy must allow `delivery.logs.amazonaws.com`. | Firehose is the intermediary — WAF does not write to S3 directly. |291292put-logging-configuration CLI moved verbatim to [deployment-cli-commands.md](references/deployment-cli-commands.md).293Load on demand when enabling logging in Step 7.294295CloudWatch Logs resource policy JSON moved verbatim to [managed-rules-and-logging-guide.md](references/managed-rules-and-logging-guide.md).296Load on demand when logging to CloudWatch Logs.297298### Step 8: Association with ALB / API Gateway / CloudFront299300ALB / API Gateway / CloudFront association CLI moved verbatim to [deployment-cli-commands.md](references/deployment-cli-commands.md).301Load on demand when associating in Step 8.302303A Web ACL can associate with multiple resources (one ACL per304resource). CloudFront allows only one Web ACL per distribution.305306### Step 9: CAPTCHA and Challenge actions307308CAPTCHA/Challenge semantics moved verbatim to [managed-rules-and-logging-guide.md](references/managed-rules-and-logging-guide.md).309Load on demand when deciding CAPTCHA vs Challenge.310311CAPTCHA rule JSON moved verbatim to [worked-examples.md](references/worked-examples.md).312Load on demand when adding CAPTCHA in Step 9.313314**Integration SDK:** the client-side `aws-waf` JavaScript SDK315captures the token and attaches it to subsequent requests. The316SDK is specific to each Web ACL — copy the integration snippet317from the console or API.318319ATP rule group config moved verbatim to [managed-rules-and-logging-guide.md](references/managed-rules-and-logging-guide.md).320Load on demand when configuring ATP login protection.321322## Visibility config323324Every rule and the Web ACL itself require a `VisibilityConfig`:325326```json327{328 "SampledRequestsEnabled": true,329 "CloudWatchMetricsEnabled": true,330 "MetricName": "<unique-metric-name>"331}332```333334- `SampledRequestsEnabled: true` — retains up to 100 sampled335 requests per rule per 5-minute window for debugging.336- `CloudWatchMetricsEnabled: true` — emits a CloudWatch metric per337 rule (`AWS/WAFV2` namespace for regional, `AWS/CloudFront` for338 CloudFront scope).339- `MetricName` — must be unique within the Web ACL.340341ALWAYS enable both. The metrics are free; sampled requests are342essential for debugging rule matches.343344## Workload matrix345346| Workload | Scope | Managed rules | Custom rules | Rate limit | CAPTCHA/Challenge |347|---|---|---|---|---|---|348| Public web app behind CloudFront | CLOUDFRONT | Common, SQLi, Bot Control, IP Reputation | Geo-block, URI allow-list | FORWARDED_IP on `/api/*` | Challenge on `/search`, `/login` |349| ALB-hosted API | REGIONAL | Common, SQLi, KnownBadInputs | IP-set allow-list, size constraint | IP on `/api/*` | None |350| API Gateway REST API | REGIONAL | Common, SQLi, Linux | API-key header check | FORWARDED_IP on all | None |351| Login endpoint | REGIONAL | Common, SQLi, ATP | None | IP on `/login` | CAPTCHA on `/login` |352| Signup form | REGIONAL | Common, SQLi, ACFP | Email domain check | FORWARDED_IP on `/signup` | CAPTCHA on `/signup` |353| Internal admin API | REGIONAL | Common | Allow corporate CIDR only, block all else | None | None |354355## Recent AWS features (2024-2026)356357Recent AWS features moved verbatim to [advanced-patterns.md](references/advanced-patterns.md).358Load on demand for 2024-2026 capability checks.359360## NEVER (anti-patterns)361362- NEVER create a CLOUDFRONT-scope Web ACL to protect an ALB or API363 Gateway. Scope is immutable. CLOUDFRONT scope attaches only to364 CloudFront distributions; REGIONAL scope attaches to ALB, API365 Gateway, AppSync, Cognito, App Runner. Wrong scope = silent366 association failure.367368- NEVER put managed rule groups at priority 0 when you have369 allow-list rules. A partner IP that should bypass managed rules370 gets blocked because the managed rule evaluated first. Put371 allow-list rules at the lowest priorities (0-9) so they win.372373- NEVER enable a Block action on a new rule without first running374 it in Count mode. Run Count for 1-2 weeks, inspect sampled375 requests for false positives, then switch to Block. Direct Block376 on an untested rule risks blocking legitimate users.377378- NEVER use `IP` aggregate key for a rate-based rule when traffic379 arrives via a CDN, ALB, or proxy. All clients share the CDN380 egress IP; the rule rate-limits the CDN node, not the abusive381 client. Use `FORWARDED_IP` with `X-Forwarded-For`.382383- NEVER enable logging without first verifying the destination's384 resource policy. A missing or mis-scoped policy on the Firehose385 delivery stream, CloudWatch Logs log group, or S3 bucket causes386 WAF to silently drop logs — there is no error, just missing data.387388- NEVER assume a Web ACL takes effect immediately on CloudFront.389 Distribution updates propagate over several minutes. For ALB/API390 Gateway, the WAF association takes effect within ~60 seconds.391392- NEVER configure ATP without specifying the exact `LoginPath`,393 `UsernameField`, and `PasswordField`. Without the field394 identifiers ATP cannot match, and the rule silently does nothing.395396- NEVER omit `VisibilityConfig` on any rule. Without metrics and397 sampled requests, you cannot debug why a rule matched.398399- NEVER deviate from the checklist output format. Substituting400 `Verdict` / `**VERDICT**` / `### Verdict:` for the literal401 `VERDICT:` label silently breaks downstream deployment pipelines402 and assertion-based evals.403404## Expert heuristic — choosing scope, rules, and actions405406Full heuristic detail moved verbatim to [advanced-patterns.md](references/advanced-patterns.md).407Load on demand when choosing scope, rules, actions, rate keys, or logging.408409## Pre-flight safety checks (run before any provisioning CLI)410411Pre-flight CLI checks moved verbatim to [diagnostic-commands.md](references/diagnostic-commands.md).412Load on demand before running any provisioning CLI.413414## Output format — MANDATORY literal labels415416When invoked with a Web ACL provisioning request, your ENTIRE417response MUST be the checklist block below. The labels are418**case-sensitive all-caps keywords** — write them EXACTLY as419shown. Do NOT write a preamble. Start with `ACL:` and stop after420the `VERIFICATION_COMMANDS:` block.421422```text423ACL: <web-acl-name>424VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING425CHECKLIST:426 [✓] Scope — <CLOUDFRONT | REGIONAL> (<region>)427 [✓] Default action — <Allow | Block>428 [✓] Managed rules — <rule-group-name (priority N), ...>429 [✓] Custom rules — <rule-name (priority N, statement, action), ...>430 [✓] Rate-based rules — <limit> req/5min, aggregate key <IP | FORWARDED_IP | URI | ...>431 [✓] Visibility config — CloudWatch metrics enabled, sampled requests enabled432 [✓] Logging — <Firehose stream | CloudWatch log group | S3 bucket | none>433 [✓] Association — <resource-arn | pending>434 [✓] Tags — <key=value pairs>435 [OPTIONAL] CAPTCHA / Challenge — <rule-name (action) | none>436 [OPTIONAL] Bot Control / ATP / ACFP — <rule-group-name | not enabled>437VERIFICATION_COMMANDS:438 aws wafv2 list-web-acls --scope <scope> --region <region>439 aws wafv2 get-web-acl --scope <scope> --id <web-acl-id> --region <region>440 aws wafv2 list-resources-for-web-acl --web-acl-arn <web-acl-arn> --region <region>441 aws wafv2 get-logging-configuration --web-acl-arn <web-acl-arn> --region <region>442```443444**Status marker semantics:**445- `[✓]` — configuration is applied and verified.446- `[✗]` — configuration is NOT applied or is misconfigured. Cite447 the gap.448- `[OPTIONAL]` — recommended but not required for the workload type.449- `[INPUT NEEDED]` — a prerequisite value is missing (target450 resource ARN, logging destination, IP set ARN) and the operator451 must provide it before provisioning can proceed.452453**PREREQUISITES_MISSING verdict:** if any REQUIRED prerequisite is454missing (target resource ARN for association, logging destination455when logging is requested, IP set ARN when referenced by a custom456rule), the verdict is `PREREQUISITES_MISSING` with each gap listed.457The checklist shows the target configuration with `[INPUT NEEDED]`458or `[✗]` for unmet prerequisites.459460## Edge-case handling461462Edge-case catalog moved verbatim to [advanced-patterns.md](references/advanced-patterns.md).463Load on demand when a deployed ACL misbehaves.464465## References (load on demand)466467- [worked-examples.md](references/worked-examples.md) - secondary examples: rate-based rule JSON, CAPTCHA rule JSON468- [diagnostic-commands.md](references/diagnostic-commands.md) - pre-flight safety check CLI469- [advanced-patterns.md](references/advanced-patterns.md) - expert heuristic detail, edge cases, recent AWS features470- [deployment-cli-commands.md](references/deployment-cli-commands.md) - full 9-step CLI sequences, logging and association CLI471- [managed-rules-and-logging-guide.md](references/managed-rules-and-logging-guide.md) - rule group tables, ATP config, aggregate keys, logging policies472473## Domain474475AWS CloudOps / WAFv2 Web Application Firewall Provisioning.476477## AWS documentation478479- **AWS WAF Developer Guide** — https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html480- **WAF Managed Rule Groups** — https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-list.html481- **WAF Rate-Based Rules** — https://docs.aws.amazon.com/waf/latest/developerguide/waf-rate-based-rules.html482- **WAF Logging** — https://docs.aws.amazon.com/waf/latest/developerguide/logging.html483- **WAF CAPTCHA and Challenge** — https://docs.aws.amazon.com/waf/latest/developerguide/waf-captcha-and-challenge.html484- **WAF ATP** — https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-atp.html485- **WAF Bot Control** — https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html486- **WAFv2 CLI Reference** — https://docs.aws.amazon.com/cli/latest/reference/wafv2/487488## References489490- `references/deployment-cli-commands.md` — full copy-pasteable CLI491 command sequence for all 9 provisioning steps, including Web ACL492 creation, managed rule group attachment, custom rules, rate-based493 rules, logging configuration, ALB / API Gateway / CloudFront494 association, CAPTCHA / Challenge rules, and Terraform495 `aws_wafv2_web_acl` / `aws_wafv2_web_acl_association` /496 `aws_wafv2_ip_set` / `aws_wafv2_regex_pattern_set` resource497 equivalents.498499- `references/managed-rules-and-logging-guide.md` — deep reference500 on managed rule group internals (Common, SQLi, Bot Control, ATP,501 ACFP, IP Reputation), WCU costs, versioning, scope-down502 statements, logging destination resource policies, CAPTCHA /503 Challenge token lifecycle, and aggregate key selection.