AWS Certified SysOps Administrator – Associate — Question 432
An AWS Lambda function is intermittently failing several times a day. A SysOps administrator must find out how often this error has occurred in the last 7 days.
Which action will meet this requirement in the MOST operationally efficient manner?
Answer options
- A. Use Amazon Athena to query the Amazon CloudWatch logs that are associated with the Lambda function.
- B. Use Amazon Athena to query the AWS CloudTrail logs that are associated with the Lambda function.
- C. Use Amazon CloudWatch Logs Insights to query the associated Lambda function logs.
- D. Use Amazon OpenSearch Service (Amazon Elasticsearch Service) to stream the Amazon CloudWatch logs for the Lambda function.
Correct answer: C
Explanation
Amazon CloudWatch Logs Insights is the most operationally efficient solution because it allows direct, interactive querying of log data in CloudWatch without requiring any data movement or infrastructure setup. Using Amazon Athena requires exporting logs to Amazon S3 first, which introduces unnecessary complexity and latency. Similarly, streaming logs to Amazon OpenSearch Service requires provisioning and maintaining a cluster, which is highly inefficient for this scenario.