
Explanation:
CloudWatch Logs metric filters allow you to search and match terms or patterns in your log data and turn them into numerical CloudWatch metrics. This is the most operationally efficient way to monitor specific events like HTTP 404 codes. Subscription filters (B) are used to stream logs to other services (like Lambda or Kinesis). Lambda (C) and manual scripts (D) are less efficient and more complex to implement than a native metric filter.
Ultimate access to all questions.
Question #25 \nA 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. \nWhat is the MOST operationally efficient solution that meets these requirements?
A
Create a CloudWatch Logs metric filter that counts the number of times that the web server returns an HTTP 404 response.
B
Create a CloudWatch Logs subscription filter that counts the number of times that the web server returns an HTTP 404 response.
C
Create an AWS Lambda function that runs a CloudWatch Logs Insights query that counts the number of 404 codes in the log events during the past hour.
D
Create a script that runs a CloudWatch Logs Insights query that counts the number of 404 codes in the log events during the past hour.
E
None
F
None
No comments yet.