AWS WAF logs tell you which decision a web ACL made for a request. They can help you see whether a new rule generates an unexpectedly large number of blocks and where to investigate. RawTree’s documented AWS integration routes WAF logs through Amazon Data Firehose to a queryable table, with S3 backup available to investigate delivery failures. The guide to keeping sensitive data out of logs helps reviewers decide which request fields to redact before the feed is shared with a broader operations team.
Connect the web ACL and delivery stream
Start with one existing WAFv2 web ACL attached to the service you operate. Inventory its scope, the region that serves it, its current log destination and ownership in Terraform. Create a dedicated test table such as waf_logs and use the RawTree Terraform configuration for CloudFront and WAF to set up the rawtree_waf_ingestion resource. The resource takes the table name, web ACL ARN and region. For a CloudFront-scoped ACL, verify the global resource and the provider configuration in the documented example.
Review the plan for the delivery stream, IAM roles, S3 backup and WAF logging configuration. Scope permissions to the selected resources and supply the RawTree key via the deployment environment. Before switching the writer, preserve the current logging settings so they can be restored. Set the retention period for raw logs and the backup bucket. Review request fields such as query strings and headers to determine what to redact before delivery.
Verify event shape with routine requests
Send a few ordinary requests to the test application, wait for Firehose’s batch to arrive and look for an expected path and time. Use a synthetic fixture to exercise the analysis of less frequent decisions without sending unusual traffic to a production service. A fixture should include an allowed request, a blocked request and a request that matches a counting rule.
SELECT action, terminatingRuleId, count() AS requests
FROM waf_logs
GROUP BY action, terminatingRuleId
ORDER BY requests DESC
LIMIT 20;
The query groups two AWS WAF logging fields that record the top-level decision and its terminating rule. Counting matches can appear in a separate array and can coexist with an overall allow decision. Keep a separate query for non-terminating matches and name the resulting measure accordingly.
Monitor delivery and put changes in context
Compare Firehose delivery monitoring with records in RawTree for the same time window. A short interval can look incomplete while a batch is buffered. Persistent lag or a sudden flatline warrants checking the HTTP destination, authentication and any failed-delivery records in S3. Use a test request with a known timestamp to distinguish a delivery issue from a quiet application.
When a rule’s block count rises, compare it to request volume and look at where the decision changed. A deployment can introduce a new legitimate path that matches an existing rule. Examine recent application changes and representative requests under the team’s data-handling policy before modifying a rule. Keep separate panels for terminating actions and non-terminating matches so rule tuning starts from the correct population.
Build a useful review view
Keep two results available for the same window. Use a summary by action and terminating rule for the overview, then a smaller table with event time, request path and the rule metadata needed for review. If full URLs or request IDs are unnecessary for that workflow, give analysts a narrower view that excludes them. Track whether any rule or source fields are missing so the team can distinguish a real zero from an unclassified set of requests.
Measure the ratio of blocked to logged requests before and after a change to logging filters. If the logging configuration retains different actions at different rates, that ratio describes the received logs. Compare application traffic or a separate metrics source before interpreting it as the overall block rate. A routine reachability request and a fixture with known classifications give separate checks for the delivery path and the analytical query.
Define the data you expect to see
Write down the AWS resources that should produce records, which request actions are retained, whether any fields are redacted, and how long production operators can query the data. This becomes the reference when a dashboard shows no activity. A fully populated table with traffic from the wrong ACL is less useful than a small table whose ownership and scope are clear.
Begin with a known path on a service your team operates. Send a routine request at a recorded time from the test environment, then watch for the matching path, method and action. A second test can use an existing routine action the ACL already handles. For rare action types or fields, use a synthetic dataset with fake IPs and identifiers. That gives analysts a reproducible way to verify reports without manufacturing unusual requests against live infrastructure.
Keep the logging decision separate from the protection decision. AWS WAF can make a decision on a request even when a logging filter excludes the record. Make the filter visible in your runbook. A dashboard that reports a decline in blocked requests might be observing a logging change. Corroborate it with a separate AWS metric or application behavior when precision matters.
Confirm delivery before diagnosing traffic
Watch indicators at both ends of the pipeline. An AWS operator can check whether the receiving stream took in records and whether delivery to the destination encountered errors. An analyst can check whether the RawTree table received a late batch, whether the data ended up under another table name, or whether a timestamp filter excluded it. If the project uses an S3 backup, document what is retained there and who can retrieve it without opening access to all log data.
Record a baseline for normal delay by comparing the test request timestamp with the first time it becomes queryable. Firehose buffers records before it forwards batches, so intervals can look briefly incomplete. Track the effect of delivery delay over several intervals. If the p95 lag changes, a chart of the last few minutes may become less trustworthy even if overall volume remains steady.
Separate temporary delivery failures from sustained data loss. An endpoint can recover and receive delayed records. A malformed configuration may continue to send records to a destination no one queries. The checks need a person who knows the expected destination, the most recent configuration change and whether recovery should preserve the existing time window for investigation.
Query actions at the right level
Define the row as one logged request decision. In the summary query, group at the top level and preserve an explicit category for records that lack expected fields. Consider a fixture with two allow decisions, one block decision and one request with an allow decision plus a non-terminating count match. The top-level view should show three allows and one block. A separate match view should show one count match. Flattening matched rule arrays into the action chart would give some requests extra weight.
Build a view for analysts that makes the terminating rule, source and event time easy to find. Use the route and method only where they help identify a change in normal use. Depending on the configuration, nested fields may have different presence across sources. Inspect a few rows after connecting a new ACL before reusing the same filters across every resource.
Add the delivery check to the operational handover
Give the team an owner for the ACL, the delivery stream, the destination and the downstream charts. Document how to distinguish an idle workload from a pipeline failure. A change review should identify what moved, which credentials or destinations were affected, and how the next operator can run a routine verification request. Keep the old destination settings available until the new feed has been validated through a representative time window.
For a first dashboard, focus on logged actions, rule distribution and delivery freshness. Open a small set of sample rows from the same period when a number changes. This pairs the speed of a chart with enough source context to understand what it represents.
If a query feeds an alert, save its filters and window alongside the request review. Add a freshness indicator so the alert can distinguish a known zero from missing data. Team members should be able to reconstruct which ACLs and logging rules the display covered at the time it fired.