ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 246 - SOA-C02 discussion

Report
Export

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?

A.
Create a CloudWatch Logs metric filter that counts the number of times that the web server returns an HTTP 404 response.
Answers
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.
Answers
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.
Answers
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.
Answers
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.
Suggested answer: A

Explanation:

This is the most operationally efficient solution that meets the requirements, as it will allow the company to monitor the number of times that the web server returns an HTTP 404 response in realtime. The other solutions (creating a CloudWatch Logs subscription filter, an AWS Lambda function, or a script) will require additional steps and resources to monitor the number of times that the web server returns an HTTP 404 response.

A metric filter allows you to search for specific terms, phrases, or values in your log events, and then to create a metric based on the number of occurrences of those search terms. This allows you to create a CloudWatch Metric that can be used to create alarms and dashboards, which can be used to monitor the number of HTTP 404 responses returned by the web server.

asked 16/09/2024
Mark Chow
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first