Object lock: design retention periods and legal holds safely
Object lock is a write-once, read-many (WORM) protection that prevents stored objects or versions from being overwritten or deleted until a defined time or release condition.
Object lock is a write-once, read-many (WORM) protection that prevents stored objects or versions from being overwritten or deleted until a defined time or release condition. It does not create a backup or guarantee recovery. A wrong scope or retention setting can either leave required records unprotected or keep data undeletable too long, so validate the policy and its exceptions before locking it.
What does object lock protect?
Locking protects data objects or particular versions against overwrite and deletion while a retention requirement applies. Reads are generally allowed; changing protected content usually means creating a new version. Do not assume the new version inherits the old lock. Cloud services differ in whether a policy covers a version, container, or bucket, so check the actual scope.
For example, AWS S3 Object Lock requires bucket versioning and protects the specified object version; it does not prevent creation of a new version or delete marker. Google Cloud Storage Bucket Lock applies a bucket retention policy to existing and new objects, while its Object Retention Lock can set retention per object. Azure Blob Storage distinguishes container-level and version-level WORM. (AWS Object Lock, Google Bucket Lock, Azure immutable storage)
How do retention periods and legal holds differ?
A time-based retention period specifies how long data must remain protected. During that period, deletion and overwrite are blocked; after expiry, deletion may be allowed. A legal hold has no preset end date and stays until an authorized person explicitly removes it. This can fit an audit or investigation with an unknown end date, but requires a clear owner and release approval.
The controls may coexist. In S3, retention and legal hold are independent: an active hold continues protection after a retention period expires, and removing the hold does not unlock an unexpired retention period. Google Cloud and Azure also offer retention and event/legal holds, with provider-specific scope and interactions. Product terminology does not determine the legal meaning of a hold; have records and legal owners define the requirement. (AWS retention and holds, Google retention policies, Azure holds)
How should you choose a lock mode and exception rights?
Separate the protection level from how reversible it is. AWS S3 Governance mode blocks most users from overwriting or deleting protected versions, while specially authorized users can explicitly bypass it. Compliance mode prevents deletion or shortening retention for a protected version by any user, including the account root, until the retention date. AWS describes this as a strong commitment; confirm scope and duration before enabling it.
Locking a Google Cloud bucket retention policy prevents removing the policy or reducing its duration, and the bucket cannot be deleted until all objects satisfy retention. Azure locked time-based policies also cannot be deleted or shortened, though they can be extended. A “lock” action can make a policy effectively irreversible, not merely activate a test setting. (AWS modes, Google lock effects, Azure locked policies)
What should you validate before applying it?
Have data owners, records managers, and security stakeholders define retention duration, scope, end conditions, exception approvers, and who can release holds. Legal obligations depend on jurisdiction and record type; do not choose periods from a service default. In a test bucket or container, create representative objects and verify allowed reads/writes and rejected deletes. Check existing objects, new versions, expiry behavior, and audit evidence.
Review the affected object count and dependent systems before locking. Google Cloud bucket retention can apply retroactively to existing objects. S3 protection is version-specific, and a simple DELETE may add a delete marker rather than remove a protected version. Consider how lifecycle rules interact with retention. Do not assume a locked policy can be rolled back; compare behavior before and after locking. (Google policy scope, AWS delete behavior)
How is object lock different from versioning or backup?
Versioning keeps prior versions and can provide recovery candidates, but it is not itself a retention lock: an authorized user or lifecycle rule may still remove old versions. A lock prevents changes to a specified object/version but does not create an independent copy or guarantee recovery from service failure, key loss, or access-policy mistakes.
Design separately for retention integrity, disaster recovery, and ransomware recovery. Consider backup in another account or region, encryption-key management, access controls, and restore exercises. Whether a WORM setup meets a regulation depends on the full service configuration and records process; a provider’s assessment alone does not establish that an organization complies.
What should operations monitor and record?
Track each object/version’s retention expiry, hold status, lock mode, policy scope, and changes to bypass permissions in audit logs. If data remains longer than expected, check overlapping retention and holds, whether a bucket/container default applied to existing objects, and how versions or delete markers behave. For a denied delete, inspect hold status, expiry, and permissions; follow an approval path instead of broadly granting bypass rights.
Retention affects lifecycle cost and account closure. A locked Google Cloud bucket cannot be deleted while any object is still within its retention period, and the lock can constrain project deletion. Check provider-specific interactions with keys, replication, lifecycle rules, and account shutdown. Document approvals, ownership changes, evidence for releasing holds, and restore procedures, then review them regularly. (Google lock consequences, AWS operations, Azure immutable storage)