Versioning changes what a delete does. In a versioned bucket, deleting prices.csv removes nothing: S3 adds a delete marker, a tiny placeholder that becomes the latest version. The object looks gone, and every real version is still underneath.
list-object-versions shows markers under DeleteMarkers, each with its own version id.
Reading an old version
aws s3api get-object --bucket market-docs-del6ev --key prices.csv --version-id <id> old-prices.csv--version-id picks one version; the last argument is the file to save it to. Use it to compare before you change anything.
Undoing a delete
aws s3api delete-object --bucket market-docs-del6ev --key prices.csv --version-id <marker id>Deleting a version by its id removes that version for good. Delete the marker, and the newest real version is the latest again: the object is back.
Rolling back
aws s3api copy-object --bucket market-docs-del6ev --key prices.csv --copy-source "market-docs-del6ev/prices.csv?versionId=<id>"Copying an old version onto its own key makes a new latest version with the old content. Nothing is deleted, so the rollback can be rolled back too.