Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

Immutability

Direct answer

Object immutability (S3 Object Lock) prevents objects from being overwritten or deleted until a retention date. Compliance mode cannot be bypassed even by root, while governance mode allows privileged override.

When to use this

Use this when objects must not be deleted or overwritten before a date.

First 30 seconds

1. Object Lock (WORM) prevents deletion for a retention period.

2. Governance (bypass with permission) vs Compliance (no bypass).

3. Must be enabled at bucket creation (S3).

4. Key for ransomware-resistant backups.

5. Test restores.

Operational verification

object PUT → retention set → deletes refused until expiry

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Object storage
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformObject storage
Scope / prerequisiteUse this when objects must not be deleted or overwritten before a date.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Compliance mode with a retention far too long.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Object lock needs versioning.
  • Compliance mode cannot be bypassed.
  • Governance mode allows privileged override.
Key checks
  • aws s3api get-object-lock-configuration --bucket <b> — lock mode/retention
  • aws s3api get-object-retention --bucket <b> --key <k> — per-object
  • aws s3api get-object-legal-hold --bucket <b> --key <k> — legal hold
ReferenceHow it works1 section · depth on demand

Reference

aws s3api get-object-lock-configuration --bucket backups
aws s3api get-object-retention --bucket backups --key file
ReferenceImportant terms & boundaries3 sections · depth on demand

In depth

Immutability: data that cannot be changed or deleted until a date

Immutable storage follows the write-once-read-many (WORM) model. For object storage, S3 Object Lock is the common API. MinIO and Ceph RGW implement it too.

Object Lock as documented by AWS

PointDetail
PrerequisiteVersioning enabled; locks apply to a specific object version
Retention periodProtects a version until a retain-until date; can be extended, never shortened
Legal holdNo expiry; stays until removed by someone with s3:PutObjectLegalHold
Governance modeUsers with s3:BypassGovernanceRetention can override it with the bypass header
Compliance modeNo user, including root, can delete the version, change its mode or shorten retention
DeletesPermanent delete of a locked version returns 403; a simple delete only adds a delete marker
$ aws s3api create-bucket --bucket backups-worm --object-lock-enabled-for-bucket
$ aws s3api put-object-lock-configuration --bucket backups-worm --object-lock-configuration \
    '{"ObjectLockEnabled":"Enabled","Rule":{"DefaultRetention":{"Mode":"GOVERNANCE","Days":30}}}'
$ aws s3api get-object-retention --bucket backups-worm --key restic/data/3f/3fa1... --version-id <id>
{ "Retention": { "Mode": "GOVERNANCE", "RetainUntilDate": "2026-12-27T01:00:00Z" } }

Choosing the mode

ModeFits
GovernanceRansomware protection with an emergency override for named admins; testing settings
ComplianceRegulatory retention where nobody may delete early

Compliance mode is effectively permanent for its period. AWS notes that the only way to remove such objects early is to close the account. Test with governance mode and short periods first.

Backup integration

  • Retention in the lock must cover the backup tool's retention. Otherwise prune jobs fail on locked objects.
  • Tools need to support immutable targets. Check how they handle forget, prune and locks.
  • Immutability protects against deletion through the storage API. Credentials and the account itself still need separate protection (MFA, separate admin accounts).

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works

Object Lock stores objects in WORM mode: in governance mode privileged users can override retention, in compliance mode nobody can delete or shorten retention until it expires. Used to protect backups from ransomware.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docObject storage current

Authoritative/upstream documentation reviewed for bounded claims in Object Storage → Immutability. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.snia.org/tech_activities/standards/curr_standards/cdmi · confidence 94%
Confirmation

Confirm action

Continue?