Unprotected S3 buckets: the basics
Why "11 nines of durability" isn't a backup strategy
S3 advertises 99.999999999% (11 nines) durability — meaning that across enough objects you should statistically lose one every few thousand years. People hear this number and conclude they don't need backups. Durability is not protection. Durability protects against disk failure, bit rot, and AZ loss; it does nothing to protect against the human or attacker who calls DeleteObject on the wrong key.
An "unprotected" bucket is one where there's no recovery path for an unintended deletion or overwrite. Versioning helps — but versions can be deleted too, by anyone with s3:DeleteObjectVersion. Ransomware operators have caught up: a modern S3-targeting attack lists every version of every object and deletes them one by one, leaving a bucket that looks intact in the API but contains nothing recoverable.
Continuity check COV-006 flags buckets with no second layer of protection — no Object Lock, no Cross-Region Replication, no AWS Backup coverage. The finding is LOW severity because not every bucket needs full DR (think build artifacts, generated thumbnails, ephemeral logs). It's a signal to decide, not an alarm to silence.
In this lesson you'll learn why versioning alone doesn't protect an S3 bucket, the three real protection layers (Object Lock, Cross-Region Replication, AWS Backup), how to pick at least two of them for any bucket holding business-critical data, and how to verify the recovery path actually works. You'll see the exact CLI calls to audit coverage across an account and to enable AWS Backup for an existing bucket.
The version-deletion ransomware playbook
In a widely-reported 2023 incident an attacker with a leaked IAM key didn't bother encrypting the victim's S3 bucket — they just enumerated every object version (ListObjectVersions) and called DeleteObjectVersion on each one in a tight loop. Versioning was enabled. MFA Delete was not. The bucket was empty in 4 hours and the only recovery was paying for a third-party backup product the company had luckily turned on a month earlier. Versioning is a speed bump for ransomware, not a wall.
Protecting an S3 bucket in action
Marco runs the data platform at a health-tech company. A continuity scan returns 34 buckets flagged as unprotected — among them sevenc3-patient-exports, a bucket holding nightly exports of de-identified patient data shared with three research partners. Severity is LOW but the bucket name is enough to make him sit up.
He pulls the bucket's current protection posture. Versioning is on, which is something — but Object Lock is off, there's no replication configured, and AWS Backup has never run against it. If someone with s3:Delete* on this bucket got compromised tonight, three months of patient exports would be gone by morning with no recovery path.
He decides on a two-layer plan: enable AWS Backup with a 35-day retention to cover accidental and malicious deletion, and add Cross-Region Replication to a second account for the partners' regulatory audit trail. Object Lock would be a third layer but the bucket is too active for compliance-mode immutability.
First, check what protection (if any) is already on the bucket — versioning, Object Lock, replication, in that order.
Current protection posture for the bucket — versioning is the only layer.
Now start an on-demand AWS Backup job. This validates the backup vault, plan, and IAM role end-to-end before the nightly schedule kicks in.
Kicked off the first AWS Backup job — it's now independent of S3 versioning and lives in the backup vault.
S3 protection layers under the hooddeep dive
AWS Backup for S3 (GA since early 2023) operates by reading every object version through the S3 API and writing a point-in-time recovery point to a backup vault — a separate S3 storage namespace that lives in the AWS Backup service account, not yours. Because the vault is owned by the Backup service, an attacker with full S3 admin in your account cannot delete its contents directly; they'd need to assume a role with backup:DeleteRecoveryPoint against the vault. Vault Lock takes this further — once locked in compliance mode, even root can't delete.
Object Lock is enforced inside S3 itself at the object-version level. In governance mode an IAM principal with s3:BypassGovernanceRetention can still delete; in compliance mode nothing — not root, not AWS support, not a court order short of the retention period expiring — can delete the object. Compliance mode is genuinely irrevocable, which is why teams default to governance mode and only escalate when a regulator demands it.
Cross-Region Replication is async and version-aware. Every PUT and DELETE on a versioned source bucket replicates to the destination bucket within seconds, including delete markers. Critical detail: a delete on the source replicates as a delete marker by default — if you want the destination to retain the original object even when the source deletes it, set DeleteMarkerReplication: Disabled. That's the configuration that makes CRR a real backup rather than a mirror.
# Audit every bucket in an account for at least one protection layer beyond versioning.
for bucket in $(aws s3api list-buckets --query 'Buckets[].Name' --output text); do
LOCK=$(aws s3api get-object-lock-configuration --bucket "$bucket" 2>/dev/null && echo YES || echo NO)
REPL=$(aws s3api get-bucket-replication --bucket "$bucket" 2>/dev/null && echo YES || echo NO)
BACKUP=$(aws backup list-protected-resources --query "Results[?ResourceArn=='arn:aws:s3:::$bucket']" --output text)
echo "$bucket lock=$LOCK repl=$REPL backup=${BACKUP:-NO}"
done What is the impact of an unprotected S3 bucket?
The most direct impact is irrecoverable data loss. A junior engineer running a cleanup script with the wrong prefix, a leaked IAM key used by a ransomware crew, or a misconfigured Lambda that wipes the bucket on a deploy rollback — all of these end the same way if the only protection is versioning that the same caller can also delete. Recovery time is hours to weeks of engineering work reconstructing from upstream sources (if those even exist).
The second-order impact is regulatory. HIPAA, GDPR, SOC 2, and PCI DSS all require demonstrable backup and recovery procedures for regulated data. A patient-data bucket with no point-in-time recovery is an audit finding the moment a regulator asks the question — and the audit cost dwarfs the backup cost.
The third-order impact is decision paralysis under pressure. When a deletion incident happens at 3am, the team that has AWS Backup configured runs one restore command and goes back to sleep. The team that has only versioning spends the night reading docs about --list-object-versions and writing recovery scripts in a state where mistakes are most expensive.
On the cost side, AWS Backup for S3 isn't free — it's roughly $0.05 per GB-month of backup storage plus per-object request charges. A 1 TB bucket with 10 million objects costs about $50/month for the storage and another $30 or so for the monthly snapshot requests. Compared to the cost of the incident it prevents (legal fees, breach disclosure, churn), this is a rounding error. Compared to the cost of every bucket being backed up indiscriminately, it's a real number — which is why coverage decisions should be data-class-driven, not blanket.
How do you protect S3 buckets properly?
Bucket protection is a four-step loop. Skip any step and either you're paying for backups of buckets that don't need them, or you'll find out which buckets needed protection during an incident.
1. Classify every bucket by data class
Tag each bucket with a data classification — regulated, business-critical, operational, ephemeral. Build artifacts and transient CDN caches are ephemeral; nightly patient exports and customer-facing assets are regulated or business-critical. Only the top two tiers need a second protection layer; the bottom two can rely on versioning or nothing at all. Without this step every coverage decision is ad-hoc and you'll over-protect cheap data and under-protect expensive data.
2. Pick the right protection mix per tier
Regulated data: AWS Backup with Vault Lock plus CRR to a second account. Business-critical data: AWS Backup with 35-day retention plus versioning + MFA Delete. Operational data: versioning with lifecycle rules to Glacier on non-current versions. Use Object Lock in compliance mode only when a regulator specifically requires write-once retention — it's genuinely irrevocable, including by you. Mixing layers matters more than picking the "best" one.
3. Verify recovery, not just backup
A backup you've never restored from is a hypothesis, not a backup. At least quarterly, restore one recovery point from each Backup plan to a scratch bucket and diff a sample of objects against the source. AWS Backup's start-restore-job makes this a single CLI call. Restoration is the part most likely to surprise you — IAM permissions on the destination bucket, KMS key access, and lifecycle rules on the restored objects are all places things go wrong silently.
4. Prevent unprotected buckets from being created
Add an AWS Config rule (s3-bucket-versioning-enabled and a custom rule for AWS Backup coverage) that flags any new bucket within minutes. For prevention, an SCP at the org level can deny s3:CreateBucket calls that aren't accompanied by an immediate Backup plan tag. Most teams find the Config-rule alert is enough — production buckets stay covered, dev buckets get a 24-hour grace period, and the policy stays out of the engineer's way.
# Enable AWS Backup coverage for a bucket and verify the recovery path on the same day.
aws backup start-backup-job \
--backup-vault-name patient-data-vault \
--resource-arn arn:aws:s3:::sevenc3-patient-exports \
--iam-role-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole \
--lifecycle DeleteAfterDays=35
# Once the first recovery point exists, restore it to a scratch bucket to prove the path works.
aws backup start-restore-job \
--recovery-point-arn arn:aws:backup:eu-west-1:123456789012:recovery-point:01234567-89ab-cdef-0123-456789abcdef \
--iam-role-arn arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole \
--metadata DestinationBucketName=sevenc3-restore-scratch \
--resource-type S3 Quick quiz
Question 1 of 5Your bucket has versioning enabled. An attacker with a leaked IAM key holding s3:Delete* runs a script that calls DeleteObjectVersion on every version of every object. What actually saves you?
You scored
0 / 5
Keep learning
Dig deeper into S3 data protection patterns and the AWS Backup integration.
- AWS Backup for Amazon S3 Official docs on backing up S3 buckets — vaults, plans, restore paths, and pricing.
- S3 Object Lock Governance vs compliance mode, retention periods, legal holds, and when each applies.
- S3 Cross-Region Replication How CRR works, delete marker replication, and configuring cross-account destination buckets.
- AWS Backup Vault Lock Write-once protection for backup recovery points — ransomware-proof when locked in compliance mode.
You've completed Protect S3 buckets with AWS Backup. You now know why versioning alone is a speed bump rather than a defence, how to combine AWS Backup, Object Lock, and Cross-Region Replication into a layered strategy that matches each bucket's data class, and how to verify the recovery path actually works before you need it. The next time a continuity scan flags an unprotected bucket, you'll have a four-step loop ready to run — classify, layer, verify, prevent.
Back to the library