- Newest
- Most votes
- Most comments
Hello.
When you delete an object in S3 that has versioning enabled, a deletion marker is created as the latest version.
Therefore, the latest version is a deletion marker.
If you delete the deletion marker, the version of the object at the time of soft deletion will be restored.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html
I'm not sure how you're using the "isLatest" tag, but you can't set tags on deletion markers.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingDelMarkers.html
When you soft delete an object with multiple versions in S3, the latest version is updated as the delete marker. So, the "isLatest" tag is associated with the delete marker, indicating that it's the latest version and represents the deletion of the object. If you delete the delete marker, the version of the object at the time of the soft deletion will be restored.
- Soft deletion creates a delete marker.
- The delete marker is marked as the latest version.
- You cannot set tags on delete markers.
If you need to manage delete markers or retrieve information about them, you can use AWS CLI commands like aws s3api list-object-versions
It should be the delete marker.
Setting it to the version before the delete marker was applied is effectively like rolling back the delete operation.
See the section Use the AWS CLI to remove the delete marker of https://repost.aws/knowledge-center/s3-undelete-configuration
Look at the aws s3api list-object-versions
command, an in particular the last bit --query 'DeleteMarkers[?IsLatest==
true]'
For an object to be considered to be deleted, IsLatest has to be true for the delete marker.
Relevant content
- asked a month ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago