# Event Filtering

Event filtering applies rules to determine which events are captured, forwarded, stored, or processed at a given stage.

Cloud concept. Updated 2026-11-26. Page: https://blowstack.com/tools/cloud-concepts-hub/event-filtering

> Event filters select records by event type, source, or field values so that each destination receives the data it needs. Filtering before transmission or ingestion can reduce traffic and cost, but it can also remove evidence needed for troubleshooting, detection, or audits.

Practice exams covering Event Filtering: [DVA-C03 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate).

## 5 key aspects of Event Filtering

Effective filtering combines precise predicates with deliberate placement, verified coverage, and a retention plan for evidence that downstream rules may exclude.

1. **Predicate matching**: Match on event type, source, or field values. Verify supported operators, data types, units, and missing-field behavior with representative records.
2. **Filter placement**: Apply the rule before the work you want to avoid, such as collector transmission or subscriber delivery. Use query-time filters when you need different views without discarding retained data.
3. **Destination-specific selection**: Give each subscription or collection path criteria that match its purpose. Check whether overlapping rules cause the same event to reach a destination more than once.
4. **Capture scope and evidence retention**: Set diagnostic capture criteria around the question being investigated, and retain broader coverage where correlation, audits, or incident review require it. An event excluded from every retained path cannot be recovered by changing the filter.
5. **Validation and change control**: Version rules, verify expected matches and exclusions, and recheck coverage after event schemas, audit settings, or downstream dependencies change.

## Cloud services for Event Filtering

These services illustrate how filters at different stages can serve different purposes. Azure SQL Database narrows a diagnostic capture before writing to a target, while Microsoft Sentinel's Windows Security Events via AMA connector controls what the agent collects for ingestion. Azure Event Grid and Amazon EventBridge filter events that have already been published, so subscribers can receive different subsets of the same stream. In a pipeline that uses both collection and routing filters, keep the collection scope broad enough for all required consumers, then narrow each delivery path independently. A routing rule cannot recover an event omitted at collection.

- **[Azure SQL Database](https://blowstack.com/tools/cloud-services-hub/azure-sql-database)**: Database-scoped Extended Events sessions can apply predicates to selected events so that only matching occurrences are recorded in a configured target. This supports focused diagnostic captures, such as recording completed operations above a duration threshold.
- **[Microsoft Sentinel](https://blowstack.com/tools/cloud-services-hub/microsoft-sentinel)**: The Windows Security Events via AMA connector uses data collection rules to specify which Windows Security events the Azure Monitor Agent collects. Custom XPath queries can narrow collection by event ID or other supported event fields.
- **[Event Grid](https://blowstack.com/tools/cloud-services-hub/event-grid)**: Event subscriptions can filter by event type, subject, and supported event fields. Each subscription selects which events are delivered to its destination.
- **[Amazon EventBridge](https://blowstack.com/tools/cloud-services-hub/amazon-eventbridge)**: On an EventBridge event bus, a rule uses an event pattern to match fields such as source, detail type, or payload attributes. Matching events are sent to the rule's configured targets.

## What is Event Filtering

Event filtering evaluates a condition against an event at a specific point in a pipeline. A rule might select all deployment failures from production, or only completed database requests whose duration exceeds a threshold. The action on a match depends on the pipeline: a capture session records the event, a collector forwards it, or an event router delivers it to a particular subscriber. An event that does not match one subscription can still match another. Filtering selects whole events; masking or removing sensitive fields is a separate operation.

Filter placement determines what work is avoided and whether excluded records can be recovered. A source-side predicate can prevent a record from being written to a capture target, although evaluating the predicate still takes work. A collector can skip records that already exist in a local log, reducing what it forwards. A routing rule can avoid unnecessary deliveries without stopping the producer from publishing. A query-time filter only changes which records appear in the results; it does not undo ingestion or storage. Compare the stages at which a platform meters traffic, ingestion, and storage before estimating savings.

For database diagnostics, choose an event that represents the operation of interest, then add a predicate using fields that the event or engine exposes. In a SQL Extended Events session, for example, select an appropriate statement- or request-completion event and filter it by duration before writing matches to an event file. Verify the duration unit for that event and capture enough context to identify the slow operation. A narrowly scoped session limits the amount of data collected, but a rule that records only slow requests cannot establish how often requests were fast or reveal which operations never completed.

For security telemetry, start with the events required by detection rules, investigations, and retention policies. With the Windows Security Events via AMA connector in Microsoft Sentinel, a data collection rule can use custom XPath queries to select records from the Windows Security log, such as failed logons and selected account-management events. The rule controls what the agent collects; it does not enable the Windows audit policies that generate those events. Before excluding successful logons as noise, check whether any detection correlates a success with earlier failures. If broader collection is required for investigations, preserve that evidence in a separate retention path rather than assuming every downstream consumer needs it.

Test representative matches and nonmatches before rollout, including records with missing fields, unexpected values, or a different schema version. Verify the platform's comparison and Boolean behavior rather than assuming that it coerces values or treats missing fields like empty strings. Compare counts at the source and destination where possible, and verify that a known test event arrives. A quiet dashboard can mean the system is healthy, but it can also mean that auditing is disabled, a filter no longer matches, or delivery has failed. Relaxing a filter later restores visibility only for future events unless a retained copy can be replayed or queried.

## Event Filtering exam questions

Real practice exam questions on Event Filtering, with the correct answer and its explanation.

### Question 1 (DVA-C03)

**Question:**

A fleet management platform publishes vehicle events to an existing custom Amazon EventBridge event bus named `fleet-ops`. Both live and simulated vehicles produce events with a `detail-type` of `Vehicle Out of Service`. The events include a `detail.mode` field with a value of `live` or `simulation`. Six downstream applications each have a dedicated Amazon SQS standard queue. Each queue must receive every live `Vehicle Out of Service` event and no other events. The developer cannot change the publisher or add an intermediary. Which configuration meets these requirements?

**Correct answer:** Create two rules on `fleet-ops`. Configure both rules to match `detail-type` equal to `Vehicle Out of Service` and `detail.mode` equal to `live`. Add three different queues as targets of each rule.

**Explanation:** Both rules evaluate events on the bus where the publisher sends them. Each rule matches the event type and the nested mode value, then routes the event to its three queues. This reaches all six queues without exceeding the limit of five targets per rule.

## Practice Event Filtering in a full exam

Questions on Event Filtering in each practice exam, with every answer option and an explanation for each:

- [DVA-C03](https://blowstack.com/practice-exams/aws-certified-developer-associate): 7 questions

## Learn Event Filtering in lessons

2 short lessons on Event Filtering in 1 certification course.

- DVA-C03: Alert Routing vs. Event Filtering (free), https://app.blowstack.com/lessons/alert-routing-vs-event-filtering-dva-c03
- DVA-C03: Event Filtering: Per-destination matching (free), https://app.blowstack.com/lessons/event-filtering-per-destination-matching-dva-c03
