Courseiva
Continuous Improvement for Existing SolutionseasyMultiple ChoiceObjective-mapped

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company uses Amazon CloudWatch Logs to collect application logs. The operations team wants to be notified when a specific error message appears in the logs. What is the SIMPLEST way to achieve this?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a metric filter on the log group for the error message and set up a CloudWatch alarm on the metric.

The simplest way to notify when a specific error message appears in CloudWatch Logs is to create a metric filter on the log group for the error message, then set up a CloudWatch alarm on that metric. This is native, requires no custom code, and provides real-time alerting. Option A is incorrect because S3 event notifications apply to S3 objects, not CloudWatch Logs content. Option B is incorrect because subscribing a Lambda function is more complex than using a metric filter and alarm. Option D is incorrect because CloudWatch Logs Insights queries are not real-time and require manual or scheduled execution.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Configure S3 event notifications on the log file destination to send an alert.

    Why it's wrong here

    Logs are not stored in S3 by default; this is not applicable.

  • Subscribe a Lambda function to the log group and have it check for the error message.

    Why it's wrong here

    Subscribing a Lambda function to a log group requires writing and maintaining custom code to parse log events, which adds operational overhead and violates the "simplest" requirement. This approach is tempting because Lambda can indeed process log streams for arbitrary pattern matching, and would be correct if the team needed to transform logs or trigger complex remediation logic beyond simple notification. However, CloudWatch Logs already provides a native metric filter that can directly trigger an alarm without any custom code.

  • Create a metric filter on the log group for the error message and set up a CloudWatch alarm on the metric.

    Why this is correct

    Metric filters convert log events into metrics, and alarms can trigger notifications.

  • Use CloudWatch Logs Insights to run a query periodically and send results via email.

    Why it's wrong here

    This is for ad-hoc analysis, not real-time alerting.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.