Protecting Backups Against Ransomware with AWS Backup
This lesson explains how backups, the last line of defence against ransomware and destructive attacks, are made immutable, isolated and tested so that the attacker cannot destroy them too.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the basic features of AWS Backup.
- Protect backups with Vault Lock, copies to other accounts and logically air-gapped vaults.
- Describe how Data Lifecycle Manager, Recycle Bin and snapshot locks protect EBS snapshots.
AWS Backup basics
AWS Backup centralises backups across AWS services and accounts. The following list describes its basic features.
- Central backups for EC2, EBS, RDS, Aurora, DynamoDB, EFS, FSx, S3, DocumentDB, Neptune, Storage Gateway and more.
- Backup plans: schedules, retention, cold storage; resource assignments by tag or ID.
- Organisation backup policies deploy plans across accounts; Backup Audit Manager reports compliance.
AWS Backup basics
Protecting backups from attackers
Ransomware attackers try to delete or encrypt backups before they encrypt production data, so that the victim cannot recover. Copy rules place recovery points in other Regions and, importantly, in a dedicated backup account, encrypted with separate KMS keys. Compromising the production account then does not reach the copies. AWS Backup Vault Lock in compliance mode becomes permanent after a grace period: nobody, not the root user and not AWS, can delete recovery points before their retention ends or change the lock. In governance mode, users with the right permissions can still manage the lock, which suits testing.
Logically air-gapped vaults hold immutable copies isolated from your accounts and encrypted with AWS owned keys. They are shared through AWS RAM with a recovery account, so data can be restored even if the source account is lost. Restore testing regularly restores backups automatically to prove they work. The following table summarises the controls.
| Control | Protection |
|---|---|
| Copy rules | Recovery points copied to other Regions and accounts (a dedicated backup account), with separate KMS keys |
| Vault Lock, compliance mode | After a grace period, nobody (root or AWS) can delete recovery points early or change the lock |
| Vault Lock, governance mode | Authorised users can still manage the lock |
| Logically air-gapped vaults | Immutable, isolated copies with AWS owned keys, shared via RAM with a recovery account |
| Restore testing | Automatic, regular restores proving backups work |
The following diagram shows backups copied into a locked vault in a separate backup account, so they survive an administrator-level compromise.

Ransomware-resistant backups
EBS-specific protections
Three features protect EBS snapshots and AMIs specifically. Amazon Data Lifecycle Manager automates creating snapshots and AMIs on a schedule, deleting them when their retention ends, and copying them to other Regions or accounts. EBS snapshot lock makes snapshots immutable for a period, in governance or compliance mode, so they cannot be deleted even by administrators. Recycle Bin keeps deleted snapshots and AMIs for a retention period, according to rules you set, so an accidental or malicious deletion can be reversed. The following table summarises the features.
| Feature | Use |
|---|---|
| Data Lifecycle Manager | Automates EBS snapshot and AMI creation, retention and cross-Region or cross-account copies |
| EBS snapshot lock | Makes snapshots immutable |
| Recycle Bin | Retains deleted snapshots and AMIs so deletions can be reversed |
Protecting snapshots and AMIs
Backups an attacker cannot destroy
A ransomware playbook assumes the attacker gains administrator access to a production account. Backups in that account are therefore not enough. The design copies every recovery point to a dedicated backup account in another Region, into a vault locked in compliance mode:
# In the backup account (999999999999)
aws backup create-backup-vault --backup-vault-name org-immutable --encryption-key-arn $BACKUP_ACCOUNT_KEY
aws backup put-backup-vault-access-policy --backup-vault-name org-immutable --policy '{
"Version": "2012-10-17",
"Statement": [{ "Effect": "Allow", "Principal": "*", "Action": "backup:CopyIntoBackupVault",
"Resource": "*", "Condition": { "StringEquals": { "aws:PrincipalOrgID": "o-a1b2c3d4e5" } } }]
}'
aws backup put-backup-vault-lock-configuration --backup-vault-name org-immutable \
--min-retention-days 35 --max-retention-days 365 --changeable-for-days 3The organisation backup policy adds a copy action to this vault in every production account's plan. After three days the lock cannot be changed by anyone. Restore testing then restores a sample of recovery points each week and checks they work, because an untested backup is only a hope.
How are backups copied to another account and Region?
Show answer
With AWS Backup copy rules in the backup plan.
Exam Tips
Remember for the exam
- When an attacker with administrator access must not be able to delete backups, use Vault Lock compliance mode or a logically air-gapped vault.
- To copy backups to another account and Region, use AWS Backup copy rules.
- To automate EBS snapshot schedules and retention, use Data Lifecycle Manager.
- To recover accidentally deleted snapshots, use Recycle Bin.
- To prove that backups can be restored, use AWS Backup restore testing.