You have a version enabled S3 bucket.
You have accidentally deleted an object which contains 3 versions.
You would want to restore the deleted object.
What can be done?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer: B.
When you delete an object in a versioning-enabled bucket, all versions remain in the bucket, and Amazon S3 creates a delete marker for the object.
To undelete an object, you must delete the delete marker.
Select the checkbox next to the object's delete marker to recover, and then choose delete from the More menu.
For more information on how to undelete objects in version enabled S3 bucket, refer to documentation here.
https://docs.aws.amazon.com/AmazonS3/latest/user-guide/undelete-objects.htmlIf you have a versioned S3 bucket and accidentally delete an object that has multiple versions, you can restore the deleted object by following these steps:
Navigate to the S3 console and select the bucket that contains the deleted object.
Click on the "Versions" tab to see the list of all versions of the objects in the bucket.
Identify the version of the object that you want to restore. You can do this by looking at the "Version ID" column.
Select the version of the object that you want to restore by clicking the checkbox next to it.
Click on the "Actions" drop-down menu and select "Restore" from the list of options.
In the "Restore object" dialog box, choose the duration for which you want to restore the object. You can choose from a minimum of 1 day to a maximum of 365 days.
Click "Restore" to restore the object. The restored object will be available in the S3 bucket after the restoration is complete.
Option A is the correct answer. Option B is not correct as deleting the delete-marker on the object will only hide the object and its versions from view but will not restore the object. Option C is incorrect as versioning in S3 supports restoring deleted objects. Option D is partially correct but does not provide the complete solution to restoring a deleted object with multiple versions.