AWS Certified Developer – Associate / Question #1004 of 557

Question #1004

A developer needs to ensure that every update to a CodeCommit repository triggers an automated build process, runs unit tests, and generates a test report with execution metrics. The reports must be accessible through the AWS Management Console.

Which solution meets these requirements?

A

Configure AWS CodeDeploy to deploy the code, run tests during deployment, and publish results to Amazon CloudWatch Logs.

B

Use AWS Lambda functions triggered by CodeCommit changes to build the code, execute tests, and save results to an S3 bucket.

C

Set up AWS CodeBuild to build the code, run unit tests, and use CodeBuild's test reports feature to store results for access in the console.

D

Implement Amazon SageMaker Pipelines to automate the build and test process, storing reports in SageMaker's model artifacts.

Explanation

Option C is correct because AWS CodeBuild integrates directly with CodeCommit to trigger builds on repository updates. It includes built-in test reporting features that store execution metrics and results, which are accessible via the AWS Management Console. CodeDeploy (A) focuses on deployment, not builds/tests. Lambda (B) requires custom scripting and lacks native test reporting. SageMaker Pipelines (D) are ML-specific and do not integrate with CodeCommit or CodeBuild's reporting. Key points: CodeBuild automates builds/tests, generates console-accessible reports, and requires minimal setup compared to other options.

Answer

The correct answer is: C