How do you protect backups against ransomware or an attacker who gets admin in your AWS account?
AdvancedScenarioData and databases
Answer
Situation read → An attacker with admin rights in the production account can delete the backups stored there. Backups need to sit somewhere they can't reach, and be impossible to delete.
What I'd do →
- Store backup copies in a separate backup account in AWS Organizations, with access limited to a small break-glass group.
- Use AWS Backup Vault Lock in compliance mode (or S3 Object Lock in compliance mode): no one, not even root, can delete before retention ends.
aws backup put-backup-vault-lock-configuration --backup-vault-name prod-locked \
--min-retention-days 30 --max-retention-days 365 --changeable-for-days 3
- Copy cross-region as well as cross-account.
- Use separate KMS keys in the backup account, so compromising prod keys doesn't help decrypt or destroy backups.
- Add SCPs denying
backup:DeleteRecoveryPointand changes to vault policies from member accounts. - Restore-test from the backup account regularly.
Why → Immutability plus account isolation means one compromised account can't erase your way back.
Interview tip → Mention that compliance-mode lock can't be removed once the grace period passes; set retention carefully.
More on Data and databases
A release needs to rename a column that the running app reads and writes. How do you do it with zero downtime?IntermediateHow do you prove your database backups actually work?IntermediateDesign backups for an RDS PostgreSQL database with RPO of 5 minutes and RTO of 1 hour, including a region failure.AdvancedYour migrations run in an init container and two pods ran them at the same time during a deploy, leaving the schema half-applied. How do you fix the approach?IntermediateUpgrade RDS PostgreSQL from 13 to 17 with minimal downtime. How?AdvancedYou need to add an index and a column to a 500-million-row table that's written to constantly. How do you avoid locking it?Advanced