A web application running on an EC2 instance publishes its access logs to CloudWatch Logs. The logs are structured and include HTTP response codes. The team needs an efficient way to monitor how often the server returns HTTP 404 responses. What is the MOST operationally efficient solution?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a CloudWatch Logs metric filter that counts occurrences of HTTP 404 response codes..
Why this is the answer
Creating a CloudWatch Logs metric filter is the most operationally efficient solution because it directly transforms log data into a quantifiable metric in real-time without requiring additional compute resources or complex scheduling. This allows for immediate monitoring, alerting, and dashboarding of 404 errors. A CloudWatch Logs subscription filter sends log events to another destination (like Lambda or Kinesis) for processing, which is less direct for simple counting and adds cost and complexity. Deploying a Lambda function or running a script with CloudWatch Logs Insights queries hourly introduces latency, additional costs for Lambda execution or EC2 instance time, and requires managing compute resources, making them less efficient for continuous, real-time counting.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed