CLF-C02 Practice Question 96: Object Versioning
AWS Certified Cloud Practitioner (CLF-C02) · Test 10 · question 6 of 10
Users occasionally overwrite or delete important files in an Amazon S3 bucket by mistake, and the company has no way to get the earlier content back. It wants to be able to restore the previous content of an object after an accidental overwrite or deletion. What should the company enable on the bucket?
Show answer and explanation
Answer:
S3 Versioning keeps multiple variants of an object in the same bucket, so you can preserve, retrieve and restore every version of every object and recover from unintended user actions and application failures. When a versioned object is overwritten, S3 stores the new data as a new version, and the previous version can still be restored. When an object is deleted, S3 inserts a *delete marker* instead of removing the data permanently. Once versioning is enabled, a bucket can only be suspended, never returned to unversioned, and each stored version is billed as a full object.
Option A does the opposite of what the company wants, because expiration rules *delete* objects on a schedule. Option B stops buckets and objects from being made public. It has no effect on overwrites or deletions by authorized users. Option D is a cheaper storage class that stores data in a single Availability Zone. It doesn't keep old versions of objects.
Reference: Retaining multiple versions of objects with S3 Versioning