Question 1,525 of 1,546
Monitoring, Logging, and RemediationmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to run a CloudWatch Logs Insights query selecting all relevant log groups, filter where level = 'ERROR', and use stats count(*) by service. This is correct because CloudWatch Logs Insights natively supports querying multiple CloudWatch log groups in a single query, allowing you to aggregate ERROR-level entries across distributed microservices without any data movement or additional infrastructure. The `stats count(*) by service` command directly counts errors per service name from the structured JSON logs, making it the least operational overhead approach. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this tests your understanding of Logs Insights as a serverless query engine that avoids the common trap of exporting logs to third-party tools or writing custom scripts. A key memory tip: think of Logs Insights as “SQL for your logs” — it can query across log groups just like a database joins tables, so always check if a native query can solve the problem before considering external solutions.

SOA-C02 Practice Question: CloudWatch Logs Insights for querying structured…

This SOA-C02 practice question tests your understanding of monitoring, logging, and remediation. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: cloudWatch Logs Insights. 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.

Multiple microservices each write structured JSON logs to separate CloudWatch log groups. The operations team needs to find all ERROR-level log entries across all log groups for the past 24 hours and count errors by service name. Which approach achieves this with the least operational overhead?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "least"

    Why it matters: You want the option with minimum overhead, fewest steps, or lowest impact — not the most feature-rich or comprehensive answer.

Question 1mediummultiple choice
Full question →

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

Run a CloudWatch Logs Insights query selecting all relevant log groups, filter where level = 'ERROR', and use stats count(*) by service

CloudWatch Logs Insights natively supports querying multiple log groups in a single query using the `SELECT` and `stats` commands. By specifying all relevant log groups in the query scope, filtering for `level = 'ERROR'`, and using `stats count(*) by service`, the operations team can directly aggregate error counts per service without any data movement, additional infrastructure, or manual scripting. This approach has the least operational overhead because it leverages existing CloudWatch capabilities with no setup or maintenance.

Key principle: CloudWatch Logs Insights

Answer analysis

Option-by-option breakdown

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

  • Run a CloudWatch Logs Insights query selecting all relevant log groups, filter where level = 'ERROR', and use stats count(*) by service

    Why this is correct

    Logs Insights accepts a comma-separated list of log group names (or a log group name prefix pattern) in the query scope. The filter and stats commands work across all selected groups in a single query execution. No additional pipeline or aggregation layer is needed.

    Clue confirmation

    The clue word "least" in the question point toward this answer.

    Related concept

    CloudWatch Logs Insights

  • Export each log group to S3 and run an Athena query joining all exported files

    Why it's wrong here

    Exporting to S3 is an asynchronous operation (hours for large log groups) and requires setting up Glue tables or Athena schema definitions before querying. For an ad-hoc 24-hour investigation, this approach has far more setup overhead than Logs Insights.

  • Subscribe all log groups to a Kinesis Data Firehose stream and query the aggregated data in OpenSearch

    Why it's wrong here

    A Kinesis + OpenSearch pipeline is a persistent, always-on log aggregation architecture appropriate for long-term search and dashboarding. For a one-off cross-service query, it requires provisioning and configuring significant infrastructure before any query can be run.

  • Use the AWS CLI to download and grep log events from each log group separately, then sum the results

    Why it's wrong here

    CLI log downloads are slow for 24-hour windows across many groups and require scripting to aggregate counts. Logs Insights performs this server-side in seconds without downloading any data.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may overcomplicate the solution by assuming cross-log-group analysis requires data aggregation pipelines (like Kinesis or S3/Athena), when CloudWatch Logs Insights natively supports querying multiple log groups with a single query, making it the simplest and most cost-effective option.

Detailed technical explanation

How to think about this question

CloudWatch Logs Insights uses a query engine that automatically scans the specified log groups for the time range, applying filters and aggregations server-side. The `stats count(*) by service` command performs a GROUP BY operation on the `service` field extracted from the JSON logs, and the results are returned as a table. Under the hood, CloudWatch Logs Insights indexes log events by timestamp and can efficiently scan terabytes of logs in seconds, making it ideal for ad-hoc cross-group analysis without data duplication.

KKey Concepts to Remember

  • CloudWatch Logs Insights
  • log query syntax
  • cross-log-group query
  • filter and stats

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

CloudWatch Logs Insights

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Review cloudWatch Logs Insights, then practise related SOA-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related SOA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SOA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SOA-C02 question test?

Monitoring, Logging, and Remediation — This question tests Monitoring, Logging, and Remediation — CloudWatch Logs Insights.

What is the correct answer to this question?

The correct answer is: Run a CloudWatch Logs Insights query selecting all relevant log groups, filter where level = 'ERROR', and use stats count(*) by service — CloudWatch Logs Insights natively supports querying multiple log groups in a single query using the `SELECT` and `stats` commands. By specifying all relevant log groups in the query scope, filtering for `level = 'ERROR'`, and using `stats count(*) by service`, the operations team can directly aggregate error counts per service without any data movement, additional infrastructure, or manual scripting. This approach has the least operational overhead because it leverages existing CloudWatch capabilities with no setup or maintenance.

What should I do if I get this SOA-C02 question wrong?

Review cloudWatch Logs Insights, then practise related SOA-C02 questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "least". You want the option with minimum overhead, fewest steps, or lowest impact — not the most feature-rich or comprehensive answer.

What is the key concept behind this question?

CloudWatch Logs Insights

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 →

How Courseiva writes practice questions · Editorial policy

Keep practising

More SOA-C02 practice questions

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

This SOA-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 SOA-C02 exam.