If an object is deleted from an Amazon S3 bucket in production, you can retrieve it when versioning is enabled.
First, let’s understand how Amazon S3 works… When you delete an object from a version-enabled bucket, Amazon S3 creates a delete marker for the object. The delete marker becomes the current version of the object, and the actual object becomes the previous version. With a delete marker, Amazon S3 responds to requests for the object as though the object was deleted. For example, if you send a GET request for the object, Amazon S3 returns an error.
Modify the script below for your object path, then run it with the required AWS permissions.
