Backups are the last line of defense against data loss, serious failures and ransomware. The problem is that many backups fail exactly when someone needs them, because the attacker managed to delete them, because retention was too short or because nobody ever tested a restore. So a secure backup takes more than the copies themselves: they have to survive an incident and actually be restorable.
For secure backups on AWS, the focus is resilience. That covers retention and encryption, isolation of the copies and protection against deletion, and ends with restore tests, which show whether everything works. With these precautions, recovery stops being an assumption and becomes a real capability.
Strategy, RPO and RTO
Start with the objectives. RPO indicates how much data you can tolerate losing, and RTO how long you can tolerate being unavailable. These numbers drive backup frequency and the recovery architecture (the lower the RPO, the more often copies need to be made). AWS Backup centralizes policies for several services and standardizes frequency, retention and encryption in one place, which makes governance and auditing easier.
Think in layers of defense. Frequent backups handle recent recovery, and copies with longer retention cover compromises that are only discovered weeks later. A ransomware incident can lie dormant for quite a while, and by then the most recent backups already carry the problem. Relying on them alone is risky.
Isolation and deletion protection
Against ransomware and against an attacker with access to the account, the most important control is preventing backups from being deleted. Copy them to a separate, isolated account with different permissions, and use immutability or vault lock mechanisms that prevent deletion during the retention period. Think of it this way: if whoever compromises production can also delete the backups, the protection exists only on paper.
- Copy backups to a separate, isolated account
- Apply immutability or a lock for the entire retention period
- Separate the people who administer production from those who administer backups
- Encrypt backups while keeping control of the key
- Keep retention long enough to cover dormant incidents
Strengthen isolation by using policy to deny the actions that delete recovery points and vaults. An SCP applied to the backup account, or the vault access policy, prevents deletion even by someone with administrative credentials. And that is exactly the situation of an attacker who has already compromised the account: they have the credentials, but the policy blocks the deletion.
{ "Effect": "Deny", "Action": [ "backup:DeleteRecoveryPoint", "backup:DeleteBackupVault", "backup:PutBackupVaultAccessPolicy" ], "Resource": "*"}Vault Lock and immutability in practice
AWS Backup offers Vault Lock, which makes a vault's recovery points immutable during retention. In compliance mode, not even the root account can delete a backup before its time is up. It is the strongest control against deletion by ransomware or by a compromised administrator, but it comes at a price: the mode is irreversible and requires planning.
The grace period before the lock
Vault Lock has a grace window defined in its configuration. Until it ends, you can still adjust or remove the lock, and that is the interval in which you validate the retention rules before they become permanent (in the command below, the window is 3 days, set by the --changeable-for-days parameter). After that period, compliance mode becomes immutable, so choose the minimum and maximum retention carefully, because once they take effect there is no going back.
aws backup put-backup-vault-lock-configuration \ --backup-vault-name isolated-vault \ --min-retention-days 30 \ --max-retention-days 365 \ --changeable-for-days 3Encryption and restore testing
Encrypt backups and control who can decrypt them. Remember that a copy stored in another account can only be restored if there is proper access to the key, so include that in the plan. Above all, test restores periodically. Until a backup has been restored, it is an assumption. The test confirms that the data is intact, that the procedure works and that the RTO is realistic. Also document the recovery procedure, so it does not depend on a single person.
Coverage: what is left without a backup
Worse than a badly configured backup is the resource nobody included in the plan, because that failure is silent. A new database, a volume created in a hurry or an account recently added to the organization can go months without any copy, and that only shows up on the day of the restore. That is why checking coverage is as important as protecting the copies that already exist.
Tag-based backup plans help a lot. Instead of listing each resource, the plan selects everything that carries a defined tag, and new resources are protected as soon as they receive the tag at creation. AWS Backup Audit Manager completes the picture: it measures compliance and points out the resources that should have backups but do not.
- Select resources by tag so new assets join the plan
- Audit coverage and flag resources without backups
- Include the organization's new accounts in the backup policy
- Review coverage after significant architecture changes
Practical checklist
- Define RPO and RTO for each critical workload
- Centralize policies in AWS Backup where applicable
- Combine frequent backups with long-retention copies
- Copy backups to a separate, isolated account with different permissions
- Apply Vault Lock or another lock during retention
- Deny deletion of recovery points and vaults through policy
- Separate production administration from backup administration
- Encrypt backups and keep control of the key
- Verify key access for restoring cross-account copies
- Use tag-based selection so new assets join the plan
- Audit coverage and point out resources without backups
- Test restores periodically
- Keep the recovery procedure documented
Best practices
- Design backups to survive whoever compromises the account
- Isolate copies in a separate account with different permissions
- Use Vault Lock in compliance mode against deletion by ransomware
- Combine short and long retention to cover dormant incidents
- Select resources by tag and audit coverage
- Test restores, not just backup creation
- Document recovery so it does not depend on a single person
Common mistakes
- Backups in the same account, with no deletion protection
- Whoever compromises the account deletes the data and, for good measure, the backups.
- New resources left out of the backup plan
- The missing copies of these assets only come to light on the day of the restore, when it is already too late.
- Retention that is too short
- When the incident is discovered late, no clean recovery point is left.
- Never testing restores
- Recovery fails in the real incident, and the planned RTO proves unrealistic.
- Unencrypted backups
- A copy of the data sits exposed, far from the controls that protect production.
- Undocumented recovery procedure
- The restore rests in the hands of a single person and stalls under pressure.
Authorship and review
Cesar Gargiulo
CEO and founder of GUARDIASEC. Technical and editorial lead for the content published in this library.
Published on . Found a technical error? Write to [email protected] and we will correct it and keep a record of the change.