Lifecycle Rules That Deleted the Evidence
A company stores application logs and customer-uploaded documents in the same object-storage bucket. A lifecycle policy moves all objects to a cheaper storage class after 30 days and deletes them after 365 days. A legal hold notice arrives requiring preservation of all documents related to a specific customer for an open matter. An engineer discovers that documents older than 365 days have already been deleted by the lifecycle rule, and that the cheap storage class has retrieval fees and a minimum storage duration that make frequent reads expensive. The bucket has no object versioning and no separate prefix for legal-hold material. Leadership asks how to respond to the hold and prevent recurrence without a large migration project.
1. What is the immediate problem with the lifecycle configuration relative to the legal hold, and what can still be done?
Read the worked answer
The lifecycle policy applied uniformly to logs and customer documents, with no way to exempt material under legal hold, so deletion already occurred for documents past 365 days. That is a preservation failure that must be disclosed to legal counsel promptly; the company cannot recreate deleted objects, but it can stop further loss. Immediate steps: suspend or narrow the deletion rule for the affected prefixes, identify what remains, and preserve it. Because there is no versioning, deleted objects may be unrecoverable unless the provider retains them briefly or backups exist-check for any backup or replica copies before concluding data is gone. Going forward, legal-hold material must live under a separate prefix with its own lifecycle rules and, ideally, object lock or a hold flag so retention is explicit rather than incidental.
2. How would you restructure storage classes and prefixes to balance cost and preservation without a large migration?
Read the worked answer
Separate the two data types by prefix: logs, which are high-volume and low-value after a short window, and customer documents, which may be subject to holds. Apply the aggressive transition-and-delete lifecycle only to the logs prefix. For documents, use a lifecycle that transitions to cheaper storage but does not auto-delete, and reserve deletion for explicit disposition after the retention obligation ends. Where a hold applies, use object lock or a hold mechanism so lifecycle cannot remove the object. The retrieval-fee and minimum-duration issue argues against transitioning documents that are read frequently; keep actively accessed documents in a standard class and transition only cold ones. This restructure is configuration and prefix reorganization, not a data migration, so it fits the constraint. Verify by testing lifecycle behavior on a sample prefix before applying broadly.