exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

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: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
kyuhuck
Highly Voted 1 year, 2 months 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 10 times
...
Seoyong
Highly Voted 1 year, 1 month ago
Selected Answer: B
question key word : how to expire objects in S3. only S3 Lifecycle rule can expire objects.
upvoted 7 times
b0gdan433
11 months, 3 weeks ago
I think this is the most valid point.
upvoted 2 times
...
...
GripZA
Most Recent 1 week, 2 days ago
Selected Answer: D
Torn between B and D TBH, looking at documentation: "If you want to upload the raw data of your test report results to an Amazon S3 bucket: Select Export to Amazon S3." Here it clearly mentions test report results, not export as artifact. Then a little further down when referring to encryption, doc says "Disable artifact encryption to disable encryption. You might choose this if you want to share your test results, or publish them to a static website. " Now referring to it as an artifact... But this changes if you specifically configure them as artifacts in the buildspec file.
upvoted 1 times
...
spring21
4 months, 3 weeks ago
Selected Answer: D
phases: build: commands: - echo "Running tests..." - run_tests_command artifacts: files: - path/to/test_report/* discard-paths: no base-directory: path/to/test_report
upvoted 1 times
...
[Removed]
8 months, 1 week ago
Selected Answer: B
B for me
upvoted 1 times
...
xdkonorek2
11 months, 4 weeks ago
Selected Answer: D
I think D even though this sentence sounds ridiculous: "Configure the report group as an artifact in the CodeBuild project buildspec file" they probably meant that report should be sent as an artifact and that's correct.
upvoted 2 times
flaacko
8 months, 1 week ago
D is incorrect because it talks about storing report groups as artifacts but since report groups are not CodeBuild artifacts, this cannot be done.
upvoted 2 times
...
...
seetpt
12 months ago
Selected Answer: B
I think B
upvoted 2 times
...
c3518fc
1 year 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 5 times
...
dkp
1 year 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 5 times
...
stoy123
1 year, 1 month ago
Selected Answer: D
answer D
upvoted 1 times
...
CloudHandsOn
1 year, 1 month 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
...
master9
1 year, 1 month 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
1 year, 1 month 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
1 year, 2 months 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
1 year, 3 months ago
Selected Answer: B
B is correct
upvoted 4 times
...
a54b16f
1 year, 3 months ago
Selected Answer: B
Pattern: run lambda inside PostBuild to zip up unit test result folder and copy to S3
upvoted 3 times
a54b16f
1 year, 3 months ago
B is not exactly use this pattern, but using eventBridge also works
upvoted 1 times
...
...
a54b16f
1 year, 3 months 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 4 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago