DOP-C02 domain - 15% of the exam

Monitoring and Logging

Monitoring and Logging is 15% of the DOP-C02 exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

42
Practice questions
5
Objectives
42
Medium

Where people go wrong

  • Confusing metric filters and subscription filters

    A metric filter and a subscription filter both match log patterns, and the wrong options swap them. A metric filter turns matching events into a CloudWatch metric, so an alarm sees counts over an evaluation period and never receives the log line itself. It discards the raw content, so it cannot feed S3 or OpenSearch. A subscription filter streams each matching event to a destination such as Lambda or Firehose as it is written, which is what an immediate reaction or central delivery needs.

    See it in a sample question
  • Using batch export or polling where delivery must be continuous

    Several wrong options move logs on a timer: export tasks, scheduled Lambda copies and GetLogEvents polling. Export tasks run in batches and land raw JSON in Amazon S3, so they cannot meet a near real-time requirement, and polling adds custom code and lag. Where the requirement says continuous, a CloudWatch Logs subscription filter pushes events to Kinesis Data Streams or Amazon Data Firehose, and Firehose handles buffering, Parquet conversion and delivery to S3 or OpenSearch.

    See it in a sample question
  • Treating cross-account observability as log delivery

    Cross-account observability links source accounts to a monitoring account so engineers there can view metrics and log groups in place. The wrong options treat it as a transport and expect it to push log events into an OpenSearch domain or an S3 bucket, or to deliver discrete EC2 state-change events that an alarm could act on. Log delivery needs a subscription filter feeding Firehose, and event forwarding needs an EventBridge rule in each member account that sends to a central event bus.

    See it in a sample question
  • Mixing up Synthetics, RUM and the Insights features

    Each wrong option names a real CloudWatch feature that watches a different layer. A Synthetics canary probes an endpoint on a schedule, so it works in quiet periods and can script a multi-step journey, but it runs from a controlled environment and cannot reproduce device-specific browser errors. RUM reports only what real browsers send, so it needs active users. Container Insights reports backend container resources and Lambda Insights reports function runtime detail; neither observes the browser or measures the endpoint from outside.

    See it in a sample question
  • Expecting SNS filter policies to group or mute alarms

    Wrong options use Amazon SNS to deduplicate alarm pages or silence them during maintenance. A filter policy matches message attributes on each message, so all forty alarm messages still publish, and it has no notion of a time window. A composite alarm evaluates a rule over the per-service alarms and sends one notification, while those alarms stay available for dashboards. An actions suppressor that points at a maintenance alarm withholds the composite alarm's notifications only while the maintenance alarm is in ALARM.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free sampleMonitoring and Loggingmedium

A fraud-detection workload needs to react within seconds whenever a specific error pattern appears in an application's CloudWatch Logs, by invoking an AWS Lambda function that quarantines the offending account. The team has been running a five-minute scheduled query and finds it too slow. They want each matching log event delivered to the function as it is written, filtered to only the lines that match a pattern. Which approach delivers the matching events fastest with the least overhead?

  • ASchedule a CloudWatch Logs Insights query every minute that searches the log group for the error pattern and triggers the quarantine Lambda function whenever the query returns one or more matching rows.
  • BPut a CloudWatch Logs subscription filter with the error pattern on the log group and set the quarantine Lambda function as its destination, so each matching event is delivered to the function as it is written. Correct
  • CCreate a metric filter that counts the error pattern and a CloudWatch alarm that invokes the Lambda function through an Amazon SNS topic when the count crosses one over the alarm evaluation period.
  • DEnable CloudWatch cross-account observability so the security account can see the source account's log group, then have an engineer in that account watch a live tail and invoke the function when the pattern appears.
Select a CloudWatch Logs subscription filter with a Lambda destination for near real-time, pattern-filtered, event-driven reaction over polling queries or alarms. A CloudWatch Logs subscription filter evaluates its filter pattern against events as they are ingested and pushes only the matches to its destination, and with an AWS Lambda destination the function is invoked with each matching event within seconds, which beats scheduled queries or count-based alarms for time-critical, event-driven automation.

Why A is wrong: Running Logs Insights more often shortens the delay but is still a polling loop bounded by the schedule interval, so it cannot deliver events within seconds and it re-scans the log group on every run, adding cost and lag.

Why B is correct: A subscription filter with a filter pattern and a Lambda destination pushes only the matching log events to the function in near real time as they are ingested, giving the seconds-level reaction the workload needs without any polling or scanning.

Why C is wrong: A metric filter and alarm can trigger automation, but the alarm evaluates over a period and works on counts rather than individual events, so it reacts in minutes and does not hand the matching log line itself to the function.

Why D is wrong: Cross-account observability gives visibility into the log group, but live-tail watching by an engineer is manual and not event-driven, so it cannot reliably quarantine within seconds and does not scale to an automated workload.

Free sampleMonitoring and Loggingmedium

A team streams clickstream events into a CloudWatch Logs log group and now needs that data delivered continuously into an Amazon S3 data lake with the records converted from JSON to Apache Parquet and partitioned by date, so analysts can query them efficiently with Amazon Athena. They want the conversion, buffering and delivery to be handled by a managed service rather than by code they operate. Which approach best meets this requirement?

  • ACreate an Amazon Data Firehose delivery stream with record format conversion to Parquet and dynamic partitioning enabled, and attach a CloudWatch Logs subscription filter on the log group that feeds events into the stream for delivery to Amazon S3. Correct
  • BUse the CloudWatch Logs export-to-S3 task on a daily schedule to drop the raw JSON into the data lake, then leave the analysts to convert the files to Parquet themselves with an Athena CREATE TABLE AS query each morning.
  • CSubscribe an AWS Lambda function to the log group that parses each batch, writes Parquet objects into the dated prefixes itself, and handles retries and back-pressure in its own code as the event volume changes.
  • DAttach a CloudWatch Logs subscription filter that sends the events to an Amazon SNS topic, then have S3 subscribe so each event is stored as a separate JSON object that Athena scans across at query time.
Use Amazon Data Firehose record format conversion and dynamic partitioning, fed by a subscription filter, to land query-ready Parquet in S3. Amazon Data Firehose can convert incoming records to a columnar format such as Apache Parquet and partition them dynamically before buffering and writing to Amazon S3, and a CloudWatch Logs subscription filter feeds log events into the stream continuously, so the entire conversion, partitioning and delivery pipeline is fully managed and produces Athena-ready data.

Why A is correct: Amazon Data Firehose natively converts incoming records to Parquet, applies dynamic partitioning and buffers before writing to S3, and a subscription filter feeds the log events into it continuously, so the whole conversion and delivery path is managed rather than self-operated code.

Why B is wrong: The export task can land logs in S3 but only in scheduled batches as raw JSON, so it is neither continuous nor pre-converted, pushing the Parquet conversion onto analysts and missing the managed pipeline the team wants.

Why C is wrong: A Lambda consumer can produce Parquet, but the team must write and operate the parsing, partitioning, retry and back-pressure logic, which is exactly the self-managed code the scenario asks them to avoid in favour of a managed service.

Why D is wrong: SNS is not a valid subscription filter destination for this pattern and Amazon S3 cannot subscribe to an SNS topic to store events, so this design does not work and would leave the data unconverted even if it did.

Free sampleMonitoring and Loggingmedium

A central security account must react to Amazon EC2 instance state-change events emitted by twenty member accounts in the same AWS Organisation, processing them with one set of rules and targets that the security team owns. The team wants member accounts to forward these events without each one managing its own targets, and they want a managed delivery path rather than custom forwarding code. Which design meets this?

  • AEnable Amazon CloudWatch cross-account observability so the security account can view member-account metrics, then create alarms in the security account on each member instance state metric to act on changes.
  • BAdd a resource policy on the security account event bus allowing the member accounts, then create an Amazon EventBridge rule in each member account that forwards matching EC2 state-change events to that central bus. Correct
  • CCreate an Amazon SNS topic in the security account, grant each member account publish permission, and have a Lambda function in every member account translate state changes into messages it publishes to the topic.
  • DHave each member account write the events to an Amazon S3 bucket owned by the security account, then schedule a crawler in the security account to read new objects and run the rules against the collected events.
Forward member-account events to a central EventBridge bus using a bus resource policy so one account owns the rules and targets. EventBridge supports cross-account delivery by granting a resource policy on the destination event bus and creating a rule in each source account that targets that bus, so member accounts forward events natively while the central account holds the single set of rules and targets.

Why A is wrong: Cross-account observability shares metrics and logs for viewing but does not deliver discrete state-change events, and EC2 state changes are events rather than a metric an alarm can evaluate.

Why B is correct: An event bus resource policy plus a forwarding rule in each member account routes events to the central bus, where the security team owns one set of rules and targets, all on managed EventBridge delivery.

Why C is wrong: This relies on a custom Lambda translator in every member account, which is forwarding code the team wanted to avoid, and SNS lacks the event pattern matching that EventBridge provides natively.

Why D is wrong: Batching events through S3 with a scheduled crawler adds latency and polling and is not an event-driven delivery path, so it fails the requirement for managed near real time forwarding.

Free sampleMonitoring and Loggingmedium

A media company runs a single-page web application served from Amazon CloudFront. Synthetic checks and server-side metrics all report the application as healthy, yet support tickets describe slow page rendering and JavaScript errors that only appear on certain browsers and devices. The DevOps team wants to measure the experience real users actually have in their browsers, including page load performance and client-side errors broken down by device and geography, with minimal code to maintain. Which solution should they choose?

  • ACreate additional CloudWatch Synthetics canaries that load the single-page application on a schedule and capture screenshots so the team can confirm the rendering speed that browsers experience across regions.
  • BEnable Container Insights on the backend services and alarm on request latency so the slow rendering and client-side errors reported by users can be traced to the responsible container workloads.
  • CAdd the CloudWatch RUM web client to the application so user sessions report page load timings, JavaScript errors and core web vitals, then review the RUM dashboards segmented by browser, device and country. Correct
  • DStream CloudFront access logs into CloudWatch Logs and build metric filters on response codes so that the slow rendering and browser errors users report can be quantified and alarmed on per Region.
Use CloudWatch RUM to capture real-user browser performance and client-side errors segmented by device, browser and geography. CloudWatch RUM injects a lightweight web client that records actual user sessions, including page load times, core web vitals and JavaScript errors, and lets teams break the data down by browser, device and location, which server-side or synthetic monitoring cannot reproduce.

Why A is wrong: Synthetics canaries run from a controlled headless environment rather than real customer browsers, so they cannot reproduce device-specific and browser-specific client errors that only some real users encounter.

Why B is wrong: Container Insights measures server-side container resources and never observes the browser, so it cannot explain client-side JavaScript errors or per-device rendering problems that occur after content leaves the backend.

Why C is correct: CloudWatch RUM instruments the browser to collect real-user performance, errors and web vitals and segments them by device, browser and geography, which directly answers the need to see the genuine client-side experience with a managed snippet.

Why D is wrong: CloudFront logs record edge request outcomes but contain no client rendering timings or browser error detail, so they cannot reveal the device-specific user experience the team is trying to measure.

Free sampleMonitoring and Loggingmedium

A microservices platform has one Amazon CloudWatch alarm per service tracking error rate, and an upstream networking fault recently breached forty individual alarms at once. The on-call engineer was paged forty times for what was a single root cause, and the team wants to be paged once for the overall outage while keeping the underlying per-service alarms for dashboards. Which approach meets this with the least ongoing maintenance?

  • ARaise the evaluation period and datapoints-to-alarm on every per-service alarm so transient breaches are absorbed and fewer of the individual alarms transition into the ALARM state during an event.
  • BReplace the per-service alarms with one metric math alarm that sums every service error metric and alerts when the combined error count crosses a single fixed threshold for the platform.
  • CCreate a composite alarm whose rule references the existing per-service alarms with OR logic and attach the Amazon SNS notification to the composite alarm rather than to each underlying alarm. Correct
  • DRoute every per-service alarm to one Amazon SNS topic and add a subscription filter policy so the engineer receives only the first notification published during any active incident window.
Use a composite alarm to aggregate many existing alarms into one notification while preserving the individual alarms. A composite alarm derives its state from a rule expression built on other alarms, so attaching the SNS action to the composite alarm sends one notification for the aggregate condition while the referenced per-service alarms continue to evaluate independently for dashboards.

Why A is wrong: Lengthening evaluation windows only delays and dampens each alarm; it does not group them, so a sustained outage still flips many alarms and pages the engineer repeatedly rather than once.

Why B is wrong: A summed metric math alarm reduces paging but discards the per-service signals the team wants to keep for dashboards, and a single platform-wide threshold hides which services are actually failing.

Why C is correct: A composite alarm evaluates a Boolean expression over the existing alarms and notifies once on the aggregate state, so the engineer is paged a single time while the per-service alarms stay available for dashboards.

Why D is wrong: Amazon SNS filter policies match message attributes and cannot deduplicate or count notifications across an incident, so all forty alarm messages still publish and are delivered to the subscriber.

Other domains in this exam

See also the DOP-C02 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.