AWS Certified Sysops Administrator Associate · Free Practice Question Medium
Question 37
An application uses several AWS Lambda functions that each generate a large volume of log data each day in its own Amazon CloudWatch Logs log group. A SysOps administrator is troubleshooting application issues and needs to generate a count of application errors, grouped by type, across all the log groups.
What should the administrator do to meet this requirement?
-
A
Perform an Amazon Athena query that uses the SELECT and GROUP BY keywords.
-
B
Perform a CloudWatch Logs Insights query that uses the stats command and count function.
-
C
Perform an Amazon RDS query that uses the SELECT and GROUP BY keywords.
-
D
Perform a CloudWatch Logs search that uses the groupby keyword and count function.
Reveal correct answer
Correct answer: B
Explanation
CloudWatch Logs Insights enables you to interactively search and analyze your log data in Amazon CloudWatch Logs. You can perform queries to help you more efficiently and effectively respond to operational issues. If an issue occurs, you can use CloudWatch Logs Insights to identify potential causes and validate deployed fixes.
A single request can query up to 20 log groups. Queries time out after 15 minutes, if they have not completed. Query results are available for 7 days. For this scenario, the administrator can query multiple log groups at once, and use the stats command count function to calculate aggregate statistics.
CORRECT: "Perform a CloudWatch Logs Insights query that uses the stats command and count function" is the correct answer.
INCORRECT: "Perform an Amazon Athena query that uses the SELECT and GROUP BY keywords" is incorrect. You can connect Athena to CW Logs; however, each log group will be a schema and each log stream a separate table. This would make it difficult to calculate aggregate statistics across log groups.
INCORRECT: "Perform a CloudWatch Logs search that uses the groupby keyword and count function" is incorrect. This would search an individual log group not across log groups.
INCORRECT: "Perform an Amazon RDS query that uses the SELECT and GROUP BY keywords" is incorrect. Amazon RDS is not relevant here as it cannot be used to search CW Logs.
References:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html
Save time with our AWS cheat sheets:
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
