Versioning
S3 allows you to keep multiple versions of an object in a bucket. Versioning can be enabled at bucket level. Once versioning is enabled, it protects you from accidental updates and deletes on an object. When you overwrite or delete an object, it keeps multiple copies with version numbers.
For example, when you enable versioning on a bucket called packtpub
, for each action on an existing object in the bucket, S3 creates a new version and associates a version ID with it, as shown in the following table:
Object | Last activity | Version ID |
| Jun 12, 2017 9:42:02 AM | VAgAtLChtLoMkKF4ZVoq.NAGRRBA1hSp |
| Jun 11, 2017 8:41:23 AM | 3mWAzx.l25VRt3.V.1ExutyOAEG1npX3 |
| Jun 10, 2017 5:39:58 PM | hV_2iz3GgRvOTt1NoiL8KXg3FpLJkFI7 |
When you delete an object in a version-enabled bucket, S3 does not actually delete the object but instead adds a delete marker to it.
Enabling versioning on a bucket
The steps for enabling versioning on a bucket are as follows:
- Sign in to...