DOP-C02 exam dumps

DOP-C02 practice question 56 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 56

Single answer

Your organization is using AWS CodePipeline for CI/CD, and artifacts generated during the build stage are stored in an S3 bucket. As part of compliance and cost-optimization requirements, you need to implement a strategy to manage the lifecycle of these artifacts, ensuring older artifacts are deleted after 90 days. Which solution is the most appropriate?

  1. A

    Enable versioning on the S3 bucket to automatically delete older versions of the artifacts after 90 days.

  2. B

    Create an S3 Lifecycle policy to transition artifacts to the S3 Glacier storage class after 90 days.

  3. C

    Create an S3 Lifecycle policy to delete objects in the bucket after 90 days.

  4. D

    Use AWS Lambda to periodically scan the S3 bucket and delete artifacts older than 90 days.

Show answer and explanation

Correct answer: C

Explanation

To manage artifact lifecycles in a cost-effective and compliant manner, S3 Lifecycle policies are the preferred solution for automating the deletion of objects after a specified time period. Enabling versioning or transitioning to Glacier does not satisfy the requirement to delete objects after 90 days. Using AWS Lambda is less efficient and more complex than the built-in capabilities of S3 Lifecycle policies.

  • A. Incorrect.

    Enabling versioning on the S3 bucket is useful for retaining multiple versions of objects but does not automatically delete older versions after 90 days. Additional lifecycle policies would still be required.

  • B. Incorrect.

    This approach transitions objects to a cheaper storage class but does not delete the artifacts, which is the requirement in this scenario. This would optimize cost but does not meet compliance requirements for deletion.

  • C. Correct.

    This is the correct solution. S3 Lifecycle policies allow you to automate the deletion of objects after a specified period, such as 90 days, meeting both compliance and cost-optimization requirements.

  • D. Incorrect.

    While this approach could technically work, using AWS Lambda for this task introduces unnecessary complexity and cost. S3 Lifecycle policies are the recommended and straightforward approach for managing object expiration.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam