AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 175

A company has an application and a CI/CD pipeline. The CI/CD pipeline consists of an AWS CodePipeline pipeline and an AWS CodeBuild project. The CodeBuild project runs tests against the application as part of the build process and outputs a test report. The company must keep the test reports for 90 days.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Option B is correct because it incorporates a report group in the buildspec file, ensures reports are copied to S3 upon build completion, and sets an S3 Lifecycle rule to manage retention. Options A and C do not address the need for automatic report management or lifecycle rules. Option D, while it sets expiration, lacks the automation through EventBridge and Lambda for copying the reports to S3.