I created an S3 bucket with versioning enabled and later realized that I don’t need to keep multiple versions. I suspended versioning but when I delete a file, and click on show versions, it is showing Delete marker
under "Type" and Version ID: null and Size 0 Bytes.
So I don’t understand what’s the point of suspending the versioning.
2
Answers
From Deleting objects from versioning-suspended buckets – Amazon Simple Storage Service:
I suspect this is because deleting an object does not automatically delete all of the prior versions. Instead, it only deletes the "current" object. However, if the "current object" is a version (that is, there are previous versions of the object), it will still use a Delete Marker to simply hide the current version.
If you wish to delete the whole object (including previous versions), you will need to turn on "Show versions" and delete all of the previous versions.
Response from John is correct. Another option would be to enable a lifecycle rule on the bucket that deletes versions.