nerdexam
Amazon

SOA-C03 · Question #100

A company hosts a web application on an Amazon EC2 instance. The web server logs are published to Amazon CloudWatch Logs. The log events have the same structure and include the HTTP response codes tha

The correct answer is A. Create a CloudWatch Logs metric filter that counts the number of times that the web server. A CloudWatch Logs metric filter can automatically scan log events in real time and extract specific patterns - such as HTTP 404 response codes - to publish custom metrics. This provides continuous, automated monitoring without the need for scheduled queries or external scripts, m

Submitted by packet_pusher· Mar 5, 2026Monitoring, logging, and remediation

Question

A company hosts a web application on an Amazon EC2 instance. The web server logs are published to Amazon CloudWatch Logs. The log events have the same structure and include the HTTP response codes that are associated with the user requests. The company needs to monitor the number of times that the web server returns an HTTP 404 response. What is the MOST operationally efficient solution that meets these requirements?

Options

  • ACreate a CloudWatch Logs metric filter that counts the number of times that the web server
  • BCreate a CloudWatch Logs subscription filter that counts the number of times that the web server
  • CCreate an AWS Lambda function that runs a CloudWatch Logs Insights query that counts the
  • DCreate a script that runs a CloudWatch Logs Insights query that counts the number of 404 codes

How the community answered

(44 responses)
  • A
    82% (36)
  • B
    11% (5)
  • C
    5% (2)
  • D
    2% (1)

Explanation

A CloudWatch Logs metric filter can automatically scan log events in real time and extract specific patterns - such as HTTP 404 response codes - to publish custom metrics. This provides continuous, automated monitoring without the need for scheduled queries or external scripts, making it the most operationally efficient and scalable solution.

Topics

#CloudWatch Logs#metric filter#HTTP 404#log monitoring

Community Discussion

No community discussion yet for this question.

Full SOA-C03 Practice