Versioning keeps multiple variants of an object within the same bucket. It is enabled at the bucket level.
- Uploading or overwriting an object with the same key creates a new version with a unique Version ID.
- Objects uploaded before enabling versioning have the special Version ID
"null"
.
- Suspending versioning stops creating new versions but does not remove existing ones.
Benefits:
- Protects against accidental overwrites and deletes.
- Allows rollback to a previous version.