
Answer-first summary for fast verification
Answer: Enable S3 and CloudWatch Logs integration
Enable S3 and CloudWatch Logs integration - AWS CodeBuild monitors functions on your behalf and reports metrics through Amazon CloudWatch. These metrics include the number of total builds, failed builds, successful builds, and the duration of builds. You can monitor your builds at two levels: Project level, AWS account level. You can export log data from your log groups to an Amazon S3 bucket and use this data in custom processing and analysis, or to load onto other systems. Incorrect options: Use CloudWatch Events - You can integrate CloudWatch Events with CodeBuild. However, we are looking at storing and running queries on logs, so Cloudwatch logs with S3 integration makes sense for this context.o Use AWS Lambda integration - Lambda is a good choice to use boto3 library to read logs programmatically. But, CloudWatch and S3 integration is already built-in and is an optimized way of managing the given use-case. Use AWS CloudTrail and deliver logs to S3 - AWS CodeBuild is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in CodeBuild. CloudTrail captures all API calls for CodeBuild as events, including calls from the CodeBuild console and from code calls to the CodeBuild APIs. If you create a trail, you can enable continuous delivery of CloudTrail events to an S3 bucket, including events for CodeBuild. This is an important feature for monitoring a service but isn't a good fit for the current scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As a Team Lead responsible for generating weekly reports on code builds, you need to compile data that includes the number of code builds performed, the success and failure percentages, and the total time spent by team members on these builds. Additionally, you must retrieve logs from failed builds using AWS CodeBuild and analyze them in AWS Athena for further insights.
Which of the following options will help achieve this?
A
Use CloudWatch Events
B
Enable S3 and CloudWatch Logs integration
C
Use AWS Lambda integration
D
Use AWS CloudTrail and deliver logs to S3
No comments yet.