Cloud Security

5 Immutable Cloud Backup Decisions Before Ransomware

December 1, 2026 · 8 min read · By CloudAI Security
5 Immutable Cloud Backup Decisions Before Ransomware

Immutable cloud backups are the ones a compromised administrator cannot delete. Amazon S3 Object Lock in compliance mode, a locked Cloud Storage retention policy and an Azure Backup vault in the enabled-and-locked state all enforce write-once storage on recovery copies, so a stolen admin session loses the power to erase them before encryption begins. Each option has a one-way door, so the real work is deciding retention length, lock mode and legal-hold ownership before you switch it on, not after an incident.

The reason is concrete. MITRE ATT&K technique T1490 documents that adversaries disable versioning and backup policies and delete snapshots, database backups, machine images and prior object versions in cloud environments specifically to deny victims a recovery path (Inhibit System Recovery). A backup that an IAM role, a pipeline token or a hijacked console session can delete is not a backup in that scenario; it is a second copy under the attacker’s control. Amazon’s documentation is blunt about the difference: a protected object version in compliance mode cannot be overwritten or deleted by any user, including the root user of the AWS account, and the only way to end that protection early is to delete the account itself (AWS S3 User Guide).

Why Backup Deletion Comes First

Ransomware operators do not need to start with encryption. They can start with the recovery plan: shadow copies, snapshot schedules, database dumps and the storage accounts that hold them. The cloud-specific version of T1490 targets exactly those artefacts, and the calls look like ordinary administration. That is why the CloudTrail signals of AWS IAM privilege escalation matter here: the same IAM write calls that hand a role more power are what later authorize the backup deletion.

Three properties decide whether a backup survives that step: who holds the delete permission, whether the storage layer refuses the delete regardless of identity, and whether that refusal can itself be switched off by the same identity. Versioning alone fails the third test. Soft delete is a recovery window, not a refusal: it gives you time to undo an unauthorized deletion, but it does not stop the deletion from happening. Only write-once storage with an irreversible lock passes all three, and only while the lock holds.

How the Three Locks Compare

The three major providers ship comparable mechanisms with different scope, and the scope changes what you can recover from.

ProviderMechanismScopeCan the protection be removed?
AWSS3 Object Lock: compliance or governance mode, default or per versionIndividual object versionCompliance: no, not even root. Governance: yes, with the bypass permission
Google CloudBucket retention policy, optionally lockedWhole bucket, applied to existing objects tooOnly before locking; a locked policy can be extended, never reduced
Microsoft AzureBackup vault immutability: enabled, or enabled and lockedWhole vault (Recovery Services or Backup vault)Enabled: yes. Enabled and locked: irreversible

Google’s design is the coarsest. A bucket retention policy applies to every object in the bucket, retroactively to existing ones, and delete attempts on objects younger than the period fail with a 403 retentionPolicyNotMet error. The decisive property is that once a Cloud Storage retention policy is locked, you cannot remove it or reduce its retention period; only increases are allowed, the bucket itself cannot be deleted until every object has aged past the period, and Cloud Storage adds a lien on the project that blocks project deletion until the lien is removed (Cloud Storage: Bucket Lock).

Azure scopes immutability to the vault. Enabling it blocks operations that would lose recovery points, such as stop protection with delete data, or any policy change that reduces retention below the immutability duration. Enabled alone is reversible; the enabled and locked state turns on WORM storage and makes the immutability setting irreversible, so Microsoft’s guidance is to run with it enabled first and lock only after you are satisfied with the operational impact (Azure Backup: immutable vault concept). Mind the limits: immutability does not cover operational backups for blobs, files and disks, and time-based immutability is not available for every vault type in every region.

AWS is the most granular and the easiest to misconfigure. Object Lock requires versioning, and each object version carries its own retention period and mode. Compliance mode is absolute: the version stays until its retain-until date passes, regardless of who asks. Governance mode is the trap. It protects against most users, but a caller with the s3:BypassGovernanceRetention permission who sends the x-amz-bypass-governance-retention header can delete the version or alter the lock, and the S3 console sends that header by default. A governance-mode bucket therefore defends against a wide IAM role but not against a compromised administrator who already holds the bypass permission.

Five Decisions Before You Lock

  1. Set retention from your recovery objective, not from storage cost. Decide how far back a restore must reach after the worst day, for example a 30-day window, and treat that as the floor for compliance-mode and locked policies. You can extend later; you can never shorten. Azure’s specific-duration option is the exception worth knowing: it locks recovery points for a fixed number of days and leaves older ones deletable under normal retention, which keeps storage cost bounded.
  2. Choose the mode that matches your threat model. Compliance mode and locked vaults defend against a compromised administrator; governance mode and unlocked policies defend against accidents and most roles. If the identity that can bypass governance is the same one an attacker would phish, governance is not a control, it is a delay.
  3. Verify the prerequisites before the first protected write. S3 Object Lock needs versioning on the bucket, and a simple DELETE on a locked object still returns 200 and writes a delete marker, so the object disappears from listings while the version survives. Azure needs the Microsoft.RecoveryServices resource provider registered and a policy whose retention is not lower than the immutability duration. Google applies the policy to existing objects the moment you set it, so audit what already sits in the bucket.
  4. Assign legal-hold ownership to a named role. A legal hold has no expiration date and can be placed or removed by anyone with s3:PutObjectLegalHold. Decide who may set it (incident response, legal), who may lift it, and require a ticket reference; otherwise holds accumulate on data nobody remembers protecting.
  5. Restore from a locked copy before you rely on it. Run a restore of a recovery point that is already under compliance or locked immutability, time it, and record the result. Immutability that has never been tested against a restore is a configuration, not a capability.

Trade-offs Teams Underestimate

Irreversible retention is a storage commitment. Every version written under a compliance-mode period or a locked policy has to be kept until that period expires, and lifecycle rules cannot shorten it; Google’s lifecycle management will not delete an object until it fulfils the retention policy. Forgotten buckets under a locked policy are the worst case, because they keep accumulating versions nobody can delete, which is why the inventory checks that surface forgotten storage buckets belong in the same review as the lock decision.

The second trade-off is operational. A locked Google policy prevents the bucket from being deleted until every object has met the period, so a project cleanup can stall on a bucket nobody remembers creating. An immutable Azure vault blocks stop protection with delete data before the recovery points expire; you can still stop protection while retaining the data, which breaks the offboarding workflow many teams use when a workload is decommissioned. None of these are reasons to skip the lock, but each needs a documented path before someone hits it during an incident.

The third is the boundary with erasure obligations. If your organisation must delete certain data on request under a regulation or a contract, a compliance-mode period that outlives that obligation turns a security control into a compliance problem. Resolve the boundary before locking: short compliance periods for personal data, longer ones for audit logs and recovery points, and a documented exception process for erasure requests that arrive during a retention window.

How to Verify the Lock

Configuration drift on immutability is quiet, so test it the way an attacker would.

  • Attempt a version-specific delete on a compliance-mode object using a role that holds full S3 permissions and confirm the 403. Then repeat from the console on a governance-mode object with a role that holds the bypass permission. If that second delete succeeds, you have confirmed the pitfall: the S3 console sends the bypass-governance header by default, so anyone holding the bypass permission can delete governance-mode objects from the console (AWS S3 User Guide).
  • Query the lock state programmatically: GetBucketObjectLockConfiguration on AWS, the bucket’s retention policy and its lock status on Google, and the vault’s immutability setting on Azure. Alert on any change to these settings in your audit logs, and route the alert to someone who does not hold the bypass permission.
  • Run a restore from a locked recovery point on a fixed cadence and record the duration. If the restore path depends on a key or a vault that someone could still delete, that dependency is the real gap, not the lock.

Sources