AWS Certified SysOps Administrator – Associate — Question 136

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?

Answer options

Correct answer: A

Explanation

The correct answer is A because using a CloudWatch Logs metric filter is the most direct and efficient method to count occurrences of specific log events, such as HTTP 404 responses. Options B, C, and D involve additional complexity or overhead, such as creating a subscription filter or running queries via Lambda or scripts, which are less operationally efficient.