Which solution will meet these requirements?
Add a new stage in the CodePipeline pipeline after the stage that contains the CodeBuild project. Create an Amazon S3 bucket to store the reports. Configure an S3 deploy action type in the new CodePipeline stage with the appropriate path and format for the reports.
Add a report group in the CodeBuild project buildspec file with the appropriate path and format for the reports. Create an Amazon S3 bucket to store the reports. Configure an Amazon EventBridge rule that invokes an AWS Lambda function to copy the reports to the S3 bucket when a build is completed. Create an S3 Lifecycle rule to expire the objects after 90 days.
Add a new stage in the CodePipeline pipeline. Configure a test action type with the appropriate path and format for the reports. Configure the report expiration time to be 90 days in the CodeBuild project buildspec file.
Add a report group in the CodeBuild project buildspec file with the appropriate path and format for the reports. Create an Amazon S3 bucket to store the reports. Configure the report group as an artifact in the CodeBuild project buildspec file. Configure the S3 bucket as the artifact destination. Set the object expiration to 90 days.
Explanations:
While adding a new stage to store reports in an S3 bucket is a valid approach, it does not include automatic expiration of the reports after 90 days. Without an explicit lifecycle rule on the S3 bucket, the reports would remain indefinitely unless managed manually.
This option effectively combines the use of a report group to generate test reports and an S3 bucket to store them. The EventBridge rule allows automated copying of reports to S3 after the build is completed. Additionally, the lifecycle rule ensures that the reports are automatically deleted after 90 days, meeting the retention requirement.
Adding a new stage for test action is not the correct approach for storing reports, as it does not specify how the reports will be stored or managed. The expiration setting in the buildspec file alone does not address the storage of reports in S3, making this option incomplete.
Although this option correctly references a report group and an S3 bucket for storing reports, it does not detail how to configure the report group as an artifact. Furthermore, it lacks a clear lifecycle rule for automatically expiring the reports after 90 days, which is essential for compliance with the requirement.