Your backup tool writes nightly to s3://acme-backups/. The bucket lives in the same AWS account as production, in the same region, behind the same IAM users. One Friday afternoon a deploy script gets a stale role assumption, calls aws s3 rm --recursive on the wrong prefix, and the entire restic repository is gone before the cron job that would have noticed it the next morning. The DR plan said “we have offsite backups.” The truth is that “offsite” meant a different prefix in the same bucket.
What’s happening
A backup destination has three failure modes that matter, and none of them are “the disk failed.”
The first is the bucket itself being deleted or emptied — by a script, a panicked operator, a CI job that thought it was running in a sandbox, or a console user who clicked the wrong checkbox. Versioning + MFA-delete protects against most of this, but only if it was enabled at bucket creation; turning it on after the fact does not retroactively protect what was already there.
The second is the account being compromised. A stolen access key with s3:* against the production account can delete versioned objects via DeleteObjectVersion, suspend versioning, and disable object lock. Defending against this means the backup destination cannot live under the same IAM trust boundary as the workloads it protects.
The third is regional/provider outage. AWS US-East-1 has had multi-hour control plane outages. If your backups are in US-East-1 and the workload they protect is also in US-East-1, a regional event takes both down simultaneously — and recovery in a different region without the backups means you’re rebuilding from scratch.
The decision is which combination of these you defend against, at what cost. There are four practical patterns, from cheapest to most defensive:
-
Same-account, same-region, versioning + lifecycle. One bucket, versioning on, lifecycle rule to transition old versions to Glacier Deep Archive, MFA-delete enabled. Defends against accidental overwrites and accidental deletes. Does NOT defend against a compromised account or a regional outage. Acceptable only for workloads where rebuilding from production data exports is realistic.
-
Same-account, cross-region replication (CRR). Source bucket in
us-east-1, destination bucket inus-west-2, S3 Replication enabled withDeleteMarkerReplicationandReplicaModifications. Defends against single-region failure. Does NOT defend against account compromise — a stolen key with cross-region S3 permissions can delete in both. CRR is convenient and cheap to operate. It is not a security boundary. -
Separate-account, cross-region. Backups land in a dedicated AWS account that exists only to hold backups. Production IAM has
s3:PutObject(write-only) on the destination bucket; nothing in production hass3:DeleteObject*. Object Lock in Compliance mode is enabled for the retention window. This is the minimum that defends against account compromise — a stolen key from prod cannot purge the backups. -
Separate-provider, separate-account. Primary backups to AWS S3, secondary copy to a different provider (Backblaze B2, Cloudflare R2, Wasabi, or a Garage cluster you run yourself). Defends against an AWS-wide failure, an AWS billing dispute that locks your account, and any single-provider supply-chain compromise. This is what we run for customers whose RTO/RPO cannot tolerate a multi-day AWS account-recovery dance.
For Stack Harbor’s managed environments, pattern 3 is the default and pattern 4 is added when the customer’s tier requires it.
How to verify
Confirm the production account has only PutObject against the backup bucket — not Delete*:
aws iam simulate-principal-policy \
--policy-source-arn arn:aws:iam::PROD_ACCOUNT:role/backup-writer \
--action-names s3:DeleteObject s3:DeleteObjectVersion s3:PutBucketVersioning \
--resource-arns arn:aws:s3:::acme-backups-vault/*
# All three should return "implicitDeny" or "explicitDeny"
Confirm Object Lock is on, in Compliance mode, with a retention window long enough that you’d notice a problem before the lock expires:
aws s3api get-object-lock-configuration --bucket acme-backups-vault
# {
# "ObjectLockConfiguration": {
# "ObjectLockEnabled": "Enabled",
# "Rule": { "DefaultRetention": { "Mode": "COMPLIANCE", "Days": 35 } }
# }
# }
Confirm replication is actually running, not just configured. The bucket reports replication metrics, and the destination should be roughly current:
aws s3api list-objects-v2 --bucket acme-backups-source \
--query 'Contents[?LastModified>=`2026-05-13`] | length(@)'
aws s3api list-objects-v2 --bucket acme-backups-replica \
--query 'Contents[?LastModified>=`2026-05-13`] | length(@)'
# Counts within 5% of each other for a 24h window
For a separate-provider pattern, run a periodic checksum comparison between primary and secondary using your backup tool’s verify command — restic check --read-data-subset=2% against each repository, for instance. Tracking only object counts catches deletions but not silent corruption on one side.
The fix
The principle is that the bucket that holds your last-line-of-defense backup cannot be administrable from the same credentials that administer the workload. Everything else is implementation detail.
The smallest version of that principle, for a single AWS account that needs better than nothing:
-
Create a dedicated AWS account under your AWS Organization, named something like
acme-backups-vault. It runs no workloads. Its only job is to hold backup buckets. Its root credentials are stored in a hardware token, not in 1Password. -
Create the destination bucket in
us-west-2(or wherever is far from your primary region) with versioning enabled and Object Lock in Compliance mode. Retention period set to 35 days for the rolling window; lifecycle rule transitions versions older than 30 days to Glacier Deep Archive, deletes after 365 days. -
From the production account, grant the backup-writer role a tightly-scoped trust policy to assume a role in the vault account that can ONLY
PutObjectandGetObjectunder a specific prefix. NoDelete*, noPutBucketPolicy, noPutBucketLifecycleConfiguration. The vault account’s role definition is the authoritative grant. -
Replicate critical backups to a non-AWS destination as a final layer. We typically use Backblaze B2 or a Garage S3 cluster (see Garage S3 storage deploy for the self-hosted version). Most modern backup tools — restic, rclone, kopia — can write to two destinations in parallel.
-
Run a quarterly restore drill that begins by assuming an unrelated IAM role and ends with a working application restored from the vault bucket. If the drill requires touching production credentials, you have not actually broken the blast radius.
Sample IAM policy on the vault bucket that permits write-only access from a specific external role:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowProdAccountWrite",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::PROD_ACCOUNT_ID:role/backup-writer" },
"Action": ["s3:PutObject", "s3:PutObjectAcl"],
"Resource": "arn:aws:s3:::acme-backups-vault/prod/*",
"Condition": {
"StringEquals": { "s3:x-amz-server-side-encryption": "AES256" }
}
},
{
"Sid": "AllowProdAccountList",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::PROD_ACCOUNT_ID:role/backup-writer" },
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::acme-backups-vault",
"Condition": { "StringLike": { "s3:prefix": "prod/*" } }
}
]
}
Note that Delete* is not granted. Object Lock + Compliance mode means that even if you wanted to grant it, retained objects could not be purged before the retention window expires. Old snapshots become eligible for cleanup only via lifecycle rules running under the vault account’s own credentials — which the production environment cannot touch.
For restic specifically, the forget and prune operations need to delete objects to reclaim space. Run prune from a separate “maintenance” identity that lives in the vault account, on a schedule (weekly), against snapshots older than your retention policy. The production writer never prunes; pruning is a vault-side concern.
Stack Harbor builds this blast-radius pattern by default for customers on environment management — separate-account backup vaults, Object Lock, quarterly restore drills, and a secondary copy off-AWS where required. If your current backup destination shares an IAM trust boundary with production, scope a backup-architecture review with our team.