Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 171 discussion

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?

  • A. 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.
  • B. 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.
  • C. 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.
  • D. 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.
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
kyuhuck
Highly Voted 2 months, 2 weeks ago
Selected Answer: D
Best Option: Option D appears to be the most straightforward and effective solution that meets the requirements. It simplifies the process by utilizing CodeBuild's feature to directly send reports to an S3 bucket configured as the artifact destination. By setting the object expiration to 90 days in the S3 bucket settings, it fulfills the requirement to keep the test reports for 90 days. This option does not require additional services for moving the reports to S3, assuming the CodeBuild report group configuration allows for direct report storage in S3 with specified retention policies.
upvoted 5 times
...
seetpt
Most Recent 2 days, 5 hours ago
Selected Answer: B
I think B
upvoted 1 times
...
c3518fc
1 week, 3 days ago
Selected Answer: B
Not sure why we are configuring the report group as an artifact in the CodeBuild project buildspec file. Doesn't make sense and we use S3 lifecycle to expire objects automatically.
upvoted 2 times
...
dkp
2 weeks, 6 days ago
Selected Answer: B
Both B & D seem to work, but object expiration settings still need to set the lifecycle rule manually for option D
upvoted 2 times
...
stoy123
1 month, 1 week ago
Selected Answer: D
answer D
upvoted 1 times
...
CloudHandsOn
1 month, 1 week ago
Selected Answer: D
Options B and D both provide viable solutions to meet the requirements. However, D offers a more direct and simplified approach by leveraging the capabilities of AWS CodeBuild and Amazon S3, including the use of S3 Lifecycle policies for managing the expiration of the test reports. Option B is also a valid solution but involves additional components like EventBridge and Lambda, which might not be necessary for this specific requirement. Therefore, D is the recommended solution for its simplicity and direct alignment with the requirements.
upvoted 1 times
...
Seoyong
1 month, 3 weeks ago
Selected Answer: B
question key word : how to expire objects in S3. only S3 Lifecycle rule can expire objects.
upvoted 3 times
...
master9
1 month, 3 weeks ago
Selected Answer: D
rtifacts: files: - '**/*' name: '<artifact-name>' artifactPrefix: '<path-prefix>' discardPaths: yes baseDirectory: 'test-reports' reports: reportGroupName: files: - '**/*' baseDirectory: 'test-reports' Replace <path-prefix> with the desired path prefix within the S3 bucket.
upvoted 2 times
...
dzn
2 months ago
Selected Answer: D
AWS Lambda is not necessary. Test report files specified in the `base-directory` and `files` in the buildspec.yml reports section are uploaded to S3 by specifying them in the artifacts section as well. This is mean of `Configure the report group as an artifact in the CodeBuild project buildspec file.`
upvoted 2 times
...
thanhnv142
2 months, 3 weeks ago
Selected Answer: B
B is correct: <build process and outputs a test report.> means we need report group in codebuild and store report in S3 A: No mention of report group in codebuild C: No mention of s3 and report group D: report group is not the same as an artifact
upvoted 4 times
...
twogyt
3 months, 2 weeks ago
Selected Answer: B
B is correct
upvoted 3 times
...
a54b16f
3 months, 3 weeks ago
Selected Answer: B
Pattern: run lambda inside PostBuild to zip up unit test result folder and copy to S3
upvoted 2 times
a54b16f
3 months, 3 weeks ago
B is not exactly use this pattern, but using eventBridge also works
upvoted 1 times
...
...
a54b16f
3 months, 3 weeks ago
Selected Answer: B
https://malsouli.medium.com/10-smart-ways-to-use-aws-codebuild-22a8ee0d9302 The test reports have to be handled separately , either via postbuild, or via eventbridge as suggested in B
upvoted 3 times
...
JayF88
3 months, 3 weeks ago
Selected Answer: B
definitely B
upvoted 3 times
...
ozansenturk
4 months ago
Selected Answer: B
"B. 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.": A test report expires 30 days after it is created. You cannot view an expired test report, but you can export the test results to raw test result files in an S3 bucket. Exported raw test files do not expire. https://docs.aws.amazon.com/codebuild/latest/userguide/test-report.html when you export a test group to s3, it is zipped https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-create-cli.html
upvoted 3 times
...
d262e67
4 months ago
Selected Answer: B
D might sound a better option but the problem is that "report groups" cannot be a part of artifacts. If you check the Buildspec syntax in the link below, you'll see that artifacts are separated from report groups. Under artifacts you cannot specify the arn of the report group. https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#reports-buildspec-file
upvoted 3 times
...
PrasannaBalaji
4 months ago
Selected Answer: D
D is correct.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...