Immutable storage and Vault Lock
Compare S3 Object Lock, AWS Backup Vault Lock and Amazon Glacier Vault Lock for WORM retention and ransomware-proof backups.
Exam tasks: 5.2.2 (integrity: code signing, file validation), 5.2.4 (secure replication and backup: DLM, AWS Backup, ransomware protection, DataSync)
The decision: if an attacker gets administrator access to a production account, or the whole account is closed, which copy of your data survives, who can restore it, and how do you know the copy is intact?
Three services offer write-once-read-many (WORM) protection. They differ in what they lock and how to back out.
Comparison
| S3 Object Lock | AWS Backup Vault Lock | Glacier Vault Lock | |
|---|---|---|---|
| Protects | Object versions in a versioned S3 bucket | Recovery points in a backup vault | Archives in a Glacier vault |
| Modes | Governance, compliance, legal hold | Governance or compliance | One locked policy |
| Backing out | Governance with bypass permission. Compliance never | Governance by IAM. Compliance only during the cooling-off grace time | Abort within 24 hours of initiate, never after complete |
| Retention control | Per version or bucket default | Min and max retention for the vault (1 to 36,500 days) | Vault Lock policy conditions |
| Available | Yes | Yes | Original Glacier vault service is closed to new customers |
A ransomware-resistant layout
- Backups that live in the same account as production can be deleted by whoever compromises that account. Copy them to an account the workload administrators can't touch.
- Lock the destination vault so even that account's administrators can't shorten retention.
- Guard the backup account with SCPs that deny
backup:DeleteBackupVault,backup:DeleteRecoveryPoint,backup:PutBackupVaultLockConfigurationchanges andkms:ScheduleKeyDeletionon backup keys, except for a break-glass role.
Vault Lock and air-gapped vaults
| Vault Lock governance | Vault Lock compliance | Logically air-gapped vault | |
|---|---|---|---|
| Who can remove the lock | IAM principals with permission | Nobody after the grace time, not even AWS | Nobody; compliance lock is built in |
| Grace time | None | At least 72 hours | Not applicable |
| Retention bounds | Optional min and max | Optional min (1 day or more) and max | Required: min 7 days or more, and a max |
| Encryption | Vault key | Vault key | AWS owned key by default, or a customer managed key |
| Restore from another account | Copy back first | Copy back first | Yes, share with AWS RAM or recover through multi-party approval |
| Use for | Guardrails while you tune retention | WORM retention for regulators (SEC 17a-4, FINRA) | Fast recovery when the owning account is compromised or closed |
- Backups in a locked vault can't be deleted early by anyone, including the root user.
- Once a compliance lock passes its grace time, the vault can be deleted only when it's empty, so check retention values carefully; a mistake keeps costing money until the recovery points expire.
- Multi-party approval lets a team of approvers authorise restoring from a logically air-gapped vault into another account even when the owning account is inaccessible.
Exam signal
"Protect backups from a compromised administrator" means cross-account copies to a vault with Vault Lock in compliance mode. "Restore quickly into a new account without copying first, even if the source account is gone" means a logically air-gapped vault shared through RAM or unlocked through multi-party approval.
Two different vault locks
AWS Backup Vault Lock protects recovery points in backup vaults. Glacier Vault Lock was a policy lock on the original Glacier vault service, which no longer takes new customers. S3 Object Lock protects object versions in buckets. Match the lock to the storage the question describes.
AWS Backup Vault Lock details
- Lock is governance unless you set
ChangeableForDays. Setting it makes the lock compliance. - Compliance has a cooling-off ("grace time") of 3 to 36,500 days. During it you can change or remove the lock. After it, nobody including AWS can.
- Min and max retention apply to new backup and copy jobs. Jobs outside the range fail. Existing recovery points keep their lifecycle.
- Backups in a locked vault cannot be deleted until their lifecycle ends. Avoid recovery points with retention "Always".
- Assessed for SEC 17a-4, CFTC and FINRA.
- Vault Lock governs actions through AWS Backup only. Block
ec2:ModifySnapshotAttributeandec2:ModifySnapshotTierwith SCPs for EBS recovery points, exempting the backup role. - Closing the AWS account suspends it for 90 days, after which even locked vault contents are deleted.
Glacier Vault Lock
initiate-vault-lockwith the policy. Returns a lock ID and the lock is in progress for 24 hours.- Test the policy.
abort-vault-lockto start over. complete-vault-lockwith the lock ID within 24 hours. Now the policy cannot be changed or deleted.
A vault access policy is for changeable, non-compliance rules. The lock policy is for compliance rules and is immutable.
Legacy: use S3 Object Lock on S3 Glacier storage classes instead
The original vault-based Amazon Glacier service no longer accepts new customers. Its Vault Lock works like this:
InitiateVaultLock attaches a policy and starts a 24-hour in-progress window for testing; CompleteVaultLock
makes the policy permanent, and it can never be changed or removed. New archives should use S3 Glacier Flexible
Retrieval or Deep Archive storage classes in a bucket with Object Lock.
Exam signal
"Protect backups even if the production account is compromised" means Backup Vault Lock in compliance mode plus cross-account copy to a separate account. "Test the policy for a day before making it permanent" means Glacier Vault Lock initiate then complete.
Exam trap
Glacier Vault Lock and AWS Backup Vault Lock are different features. Backup Vault Lock governance mode can be removed by IAM-permitted users, so it is not ransomware-proof alone.
Scenarios
Cross-account copies put backups outside the compromised account, and a compliance-mode lock stops even that account's administrators from deleting them. MFA helps but doesn't protect against an attacker who already has admin access. More frequent DLM snapshots in the same account can be deleted the same way. Another Region in the same account shares the same administrators.
Related
Further reading
RDS, DynamoDB, EFS and FSx encryption
Encryption at rest for RDS and Aurora, DynamoDB with the Database Encryption SDK, EFS and FSx, and which of them can be encrypted after creation.
AWS Backup, DLM and DataSync
Centralized backup plans and vaults, EBS snapshot lifecycle automation, and encrypted data transfer, with ransomware-resilient patterns.