AWS Certified Developer – Associate (DVA-C02) — Question 402

A developer needs to store files in an Amazon S3 bucket for a company's application. Each S3 object can have multiple versions. The objects must be permanently removed 1 year after object creation.

The developer creates an S3 bucket that has versioning enabled.

What should the developer do next to meet the data retention requirements?

Answer options

Correct answer: A

Explanation

An S3 Lifecycle rule is the most cost-effective and native way to manage object retention without writing custom code. Because versioning is enabled on the bucket, the lifecycle rule must be configured to both expire current versions and permanently delete noncurrent versions after 1 year to ensure complete removal of the data. Using AWS Lambda functions triggered by event notifications is unnecessary and introduces additional operational overhead and execution costs.