How do I undelete a deleted S3 object? - Amazon Simple Storage Service

How do I undelete a deleted S3 object?

This section explains how to use the Amazon S3 console to recover (undelete) deleted objects.

To be able to undelete a deleted object, you must have had versioning enabled on the bucket that contains the object before the object was deleted. For information about enabling versioning, see How do I enable or suspend versioning for an S3 bucket?.

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 the object, you must delete this delete marker. For more information about versioning and delete markers, see Object Versioning in the Amazon Simple Storage Service Developer Guide.

To recover deleted objects from an S3 bucket

The following steps describe how to recover deleted objects that are not folders from your S3 bucket including objects that are within those folders.

  1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.

  2. In the Buckets list, choose the name of the bucket that you want.

  3. Choose the List versions switch.

  4. You see object versions and delete markers for deleted objects. To undelete an object, you must delete the delete marker.

  5. Select the check box next to the delete marker of the object to recover, and then choose Delete.

  6. Confirm the deletion on the Delete objects page.

    1. Enter permanently delete under Pemanently delete objects?

    2. Choose Delete objects.

      Amazon S3 deletes the delete marker.

  7. To return to the Objects list, choose Exit.

    You can see your object in the Objects list.

Note

You can't use the Amazon S3 console to undelete folders. You must use the AWS CLI or SDK. For examples, see How can I retrieve an Amazon S3 object that was deleted in a versioning-enabled bucket?