php – Amazon S3 Delete Markers

php – Amazon S3 Delete Markers

If Versioning is enabled on an Amazon S3 bucket, then all uploads of an object to an existing key name will result in the creation of an additional version of the object. The prior versions will be kept on Amazon S3. Deleting an object will add a Delete Marker, so that the object appears to have been deleted, but prior versions are still available for download.

If a Bucket has Versioning enabled, you can view object versions and delete markers in the console:

  • Access your Bucket in the Amazon S3 console
  • Look for the Versions buttons at the top of the screen. It should have two buttons: Show, Hide
  • Selecting Show will display delete markers and all prior versions of objects

A simpler way to delete objects from Amazon S3 after a certain period of time is:

  • Select your Bucket
  • Open Properties
  • Click Lifecycle
  • Create a rule set to Permanently Delete n days after the objects creation date

php – Amazon S3 Delete Markers

Leave a Reply

Your email address will not be published.