CloudWatch Metric Filter Fails? Check Your Pattern Syntax
This SCS-C02 practice question tests your understanding of security logging and monitoring. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
{
"MetricFilter": {
"filterName": "RootAccountUsage",
"filterPattern": "{ $.userIdentity.type = \"Root\" }"
}
}
Refer to the exhibit. A security engineer creates this CloudWatch Logs metric filter on a CloudTrail log group to detect root account usage. However, no metrics are generated. What is the most likely issue?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Exhibit
Refer to the exhibit.
{
"MetricFilter": {
"filterName": "RootAccountUsage",
"filterPattern": "{ $.userIdentity.type = \"Root\" }"
}
}
A
The log group does not exist
Why wrong: The metric filter is created on the log group.
B
CloudTrail is not enabled for the account
Why wrong: CloudTrail is likely enabled.
C
The metric namespace is invalid
Why wrong: Namespace is not specified in the exhibit.
D
The metric filter pattern is incorrectly formatted
The pattern should not have backslashes and proper parentheses.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The metric filter pattern is incorrectly formatted
The most likely issue is that the metric filter pattern is incorrectly formatted. CloudWatch Logs metric filters require a valid JSON pattern that matches the log event structure. For detecting root account usage, the pattern must correctly reference the `userIdentity.type` field as `Root`. If the pattern syntax is wrong (e.g., missing quotes, incorrect key path, or invalid JSON), no metrics will be generated even if the log group and CloudTrail are properly configured.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
The metric filter pattern is incorrectly formatted
Why this is correct
The pattern should not have backslashes and proper parentheses.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume the issue is with CloudTrail or the log group, but the real problem is a subtle syntax error in the metric filter pattern that prevents any matches.
Detailed technical explanation
How to think about this question
CloudWatch Logs metric filters use a pattern syntax based on JSON or space-delimited terms. For JSON log events (like CloudTrail logs), the pattern must be a valid JSON expression, e.g., `{ $.userIdentity.type = "Root" }`. A common mistake is omitting the `$.` prefix or using single quotes instead of double quotes, which causes the filter to never match. Under the hood, CloudWatch evaluates each log event against the pattern; if the pattern is malformed, it silently fails to match all events, resulting in zero metric data points.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Security Logging and Monitoring — This question tests Security Logging and Monitoring — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The metric filter pattern is incorrectly formatted — The most likely issue is that the metric filter pattern is incorrectly formatted. CloudWatch Logs metric filters require a valid JSON pattern that matches the log event structure. For detecting root account usage, the pattern must correctly reference the `userIdentity.type` field as `Root`. If the pattern syntax is wrong (e.g., missing quotes, incorrect key path, or invalid JSON), no metrics will be generated even if the log group and CloudTrail are properly configured.
What should I do if I get this SCS-C02 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SCS-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 SCS-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.