How does S3 versioning and delete work?
BeginnerConceptStorage and Databases
Answer
With versioning enabled, every overwrite creates a new version ID and a plain DELETE just adds a delete marker, hiding the object while keeping all versions. To permanently delete you must specify the VersionId. Versioning cannot be disabled once enabled, only suspended.
aws s3api list-object-versions --bucket acme-data --prefix report.csv
aws s3api delete-object --bucket acme-data --key report.csv --version-id <id>
Pair with lifecycle rules for noncurrent versions or storage grows forever.