A company enables S3 Versioning and finds multiple versions of the same object because an on-premises application updates objects several times per day. The company wants the bucket to retain only the current version and the one immediately prior. Which solution accomplishes this?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure an S3 Lifecycle rule to retain only one noncurrent version of each object..
Why this is the answer
An S3 Lifecycle rule is the correct solution. Lifecycle rules allow you to define actions for objects based on their age or whether they are current or noncurrent versions. By configuring a lifecycle rule, you can specify that noncurrent versions of objects should expire after a certain number of days, or that only a specific number of noncurrent versions should be retained. In this scenario, a rule can be set to retain only one noncurrent version, effectively keeping the current version and the one immediately prior. S3 bucket policies control access permissions, not version retention. S3 Object Lock is for WORM (Write Once Read Many) compliance and prevents objects from being deleted or overwritten for a fixed amount of time or indefinitely, which is not the goal here. Suspending S3 Versioning would prevent new versions from being created, but wouldn't manage existing noncurrent versions and would require application changes, which is less efficient than using S3's built-in lifecycle management.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed