Ask most engineering teams if they have backups, and they will confidently point to automated daily RDS snapshots or a cron job rsyncing tarballs to an S3 bucket inside the same cloud account. On paper, recovery looks solved. During a catastrophic cloud outage or credential-compromise incident, that architecture often fails inside five minutes.

Modern attackers rarely drop ransomware on a single laptop and wait politely. Instead, they compromise a developer workstation or CI token, escalate IAM privileges inside the cloud tenant, locate backup vaults, delete historical snapshots, purge object versioning, and then wipe or encrypt primary production databases. Once your backup storage shares the same administrative control plane as the compromised workload, it is no longer a backup; it is merely another directory waiting to be deleted.

1. Upgrade from 3-2-1 to the 3-2-1-1-0 Continuity Rule

Classic backup advice taught the 3-2-1 rule: keep 3 copies of your data across 2 media types, with 1 copy offsite. Against network-propagating ransomware and compromised cloud identities, modern resilience standards extend this to 3-2-1-1-0:

  • 3 total copies of critical databases, object assets, and configuration state.
  • 2 distinct storage platforms or media tiers (for example, block snapshots plus object storage archives).
  • 1 copy stored completely offsite outside the primary cloud region.
  • 1 copy strictly immutable or air-gapped so neither automated bugs nor compromised admins can erase it prematurely.
  • 0 unverified errors allowed across regular automated recovery test runs.

2. Separate the Backup Account from the Production Account

Never store critical disaster recovery archives inside the same AWS Account, Azure Subscription, or GCP Project as your production workloads. Create a dedicated Security & Backup Vault Account governed under strict standalone authentication:

  • Production workloads hold write-only / append-only IAM credentials capable of pushing encrypted snapshots into the backup bucket, but strictly denied s3:DeleteObject, s3:DeleteObjectVersion, and bucket-policy modification permissions.
  • Administrative access into the Backup Vault Account requires hardware security keys (FIDO2/WebAuthn) stored offline with break-glass root recovery credentials separated from everyday corporate SSO.

3. Enforce WORM Storage with S3 Object Lock (Compliance Mode)

Write-Once-Read-Many (WORM) object locking makes uploaded backup objects physically undeletable for a configured retention period. In AWS S3 (or compatible object stores like Cloudflare R2 or Backblaze B2), distinguish carefully between Governance Mode and Compliance Mode:

Backup Isolation Controls: Standard Snapshots vs. Hardened Immutability
Protection Attribute Same-Account Standard Snapshot Object Lock (Governance Mode) Isolated Compliance Mode (Recommended)
Admin Account CompromiseAttacker holds prod IAM Admin Total Loss RiskSnapshots deleted via API before attack Moderate RiskAdmin can grant bypass header and erase ProtectedAccount isolated + impossible to erase early
Accidental Terraform DestroyOperator error in IaC High Riskterraform destroy drops DB snapshots ProtectedBlocks standard delete API calls ProtectedProtected until lock timestamp expires
Root Account OverrideEven with cloud root access Instant ErasureNo cryptographic retention lock OverridableWith explicit bypass permission UndeletableEven cloud root cannot delete objects early

Below is a minimal AWS CLI setup creating an Object Lock enabled vault bucket with default 30-day Compliance retention:

# 1. Create bucket inside the dedicated Backup Vault account with Object Lock enabled
aws s3api create-bucket   --bucket house603-prod-immutable-vault   --region eu-west-1   --object-lock-enabled-for-bucket

# 2. Enforce default 30-day COMPLIANCE retention on every uploaded object
aws s3api put-object-lock-configuration   --bucket house603-prod-immutable-vault   --object-lock-configuration '{
    "ObjectLockEnabled": "Enabled",
    "Rule": {
      "DefaultRetention": { "Mode": "COMPLIANCE", "Days": 30 }
    }
  }'

Note carefully: test Compliance Mode retention windows (for instance 1 to 7 days first) in a sandbox bucket before deploying multi-year locks, because you cannot lower retention or delete objects early once written, meaning locked test garbage stays billed until expiry.

4. Separate Encryption Keys from Encrypted Snapshots

Encrypt database dumps client-side (using age or asymmetric envelope KMS keys restricted inside the vault account) prior to upload. Keep a printed or hardware-backed offline copy of your master recovery decryption key inside physical safekeeping. If both your primary cloud tenant and SaaS secrets manager fail simultaneously, engineers still need the mathematical ability to decrypt restored PostgreSQL dumps onto clean replacement hardware.

5. Rehearse Quarterly End-to-End Restore Drills

An untested backup is an assumption, not a recovery plan. Every quarter, run a timed tabletop and technical restore exercise:

  1. Pull a random encrypted snapshot from the previous 14 days out of the isolated vault onto a clean staging instance.
  2. Measure exact time from disaster declaration to healthy database query response (RTO) and compare data freshness against your Recovery Point Objective (RPO).
  3. Document broken environment variables, missing DNS migration permissions, or missing seed secrets discovered during the drill, fix them immediately, and archive the log.