Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Choose your certification →

Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.1.1.8. Protecting Data Against Ransomware and Accidental Deletion (S3 Object Lock, EBS Snapshot Lock, AWS Backup Vault Lock)

3.1.1.8. Protecting Data Against Ransomware and Accidental Deletion (S3 Object Lock, EBS Snapshot Lock, AWS Backup Vault Lock)

💡 First Principle: A backup protects against ransomware only if the attacker cannot delete it. The defense is immutability that even a fully privileged administrator cannot undo, held in an account the attacker does not control.

Scenario: After a credentials compromise at a peer company in which the attacker deleted every snapshot before encrypting production, a bank requires that its backups survive an attacker holding administrator, or even root, access to the production account.

ControlProtectsGovernance modeCompliance mode
"S3 Object Lock"Individual object versions (bucket must have versioning)Users with the bypass permission can delete or shorten retentionNo user, including root, can delete the version or shorten retention until it expires. Legal hold blocks deletion with no end date until removed
"EBS snapshot lock"Individual "EBS" snapshotsLocked immediately; users with permission can unlock or change itOptional cooling-off period of 1 to 72 hours during which it can still be changed; after that it cannot be unlocked or shortened, only extended. Lock duration 1 day to 100 years. The only way to delete early is to close the account
"AWS Backup Vault Lock"Every recovery point in a backup vaultUsers with sufficient IAM permissions can remove the lockAfter a grace time of at least 3 days (72 hours) the lock is immutable: no user or AWS can delete recovery points early or change retention. Minimum and maximum retention reject non-conforming backup jobs
  • Choose by what you back up: "S3 Object Lock" for data stored as objects (logs, records, exports); "EBS snapshot lock" for snapshots managed outside "AWS Backup" (for example by "Amazon Data Lifecycle Manager"); "Backup Vault Lock" when "AWS Backup" manages backups across many services, because one lock covers every recovery point in the vault.
  • Separate the copy from the attacker: copy backups to a vault in a dedicated backup account (cross-account copy through "AWS Organizations" backup policies) and lock that vault in compliance mode. A logically air-gapped vault is locked in compliance mode by default and can be shared through "AWS RAM" so a separate recovery account can restore from it (optionally gated by multi-party approval) even if the owning account is inaccessible. Add a cross-Region copy for Regional disasters.
  • Close the side doors: Vault Lock governs actions through "AWS Backup"; deny ec2:ModifySnapshotAttribute (sharing) and ec2:ModifySnapshotTier with SCPs (exempting the backup roles), and protect the "KMS" keys the backups use.
  • Accidental deletion versus attack: "Recycle Bin" retention rules let you recover deleted "EBS" snapshots and AMIs, and "S3" versioning keeps prior versions; both help with mistakes but are not WORM controls against a privileged attacker.
  • Test in governance mode first. Compliance mode cannot be reversed after the cooling-off or grace period, and backups with very long retention keep costing money for that whole period. Closing an AWS account still deletes its vaults after the 90-day suspension, which is another reason to keep the locked copy in a different account.

⚠️ Exam Trap: Governance mode, IAM deny policies, MFA on the console and versioning can all be undone by an attacker with enough privilege. When a scenario says backups must survive a compromised administrator or root user, the answer is compliance mode (Object Lock, snapshot lock or Vault Lock) on a copy held in a separate account.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned