Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Amazon Web Services Foundations v7.0.0 · 3.1.2

MFA Delete should be enabled on versioned S3 buckets that hold important data

  • Level 2

This check looks at the versioning setting of your S3 buckets and whether MFA Delete is turned on. The safe setting is MFA Delete enabled on versioned buckets, so removing an object version or changing versioning needs a second factor.

Why it matters

Versioning protects against accidental overwrites, but anyone with the right credentials can still delete versions permanently or switch versioning off. MFA Delete closes that gap. AWS explains that with it enabled, the bucket owner must include two forms of authentication in any request to permanently delete an object version or change the versioning state of the bucket: the normal credentials plus a code from an approved MFA device.

If access keys leak, the damage an attacker can do to your data history is limited, because the keys alone are no longer enough to destroy it.

Sources: Configuring MFA delete (Amazon S3 User Guide).

How to check it yourself

Console: open the bucket, then Properties > Bucket Versioning. The console shows versioning, but AWS notes that MFA Delete cannot be enabled there, so use the CLI to read it. You can also use S3 Storage Lens, which AWS names as a way to identify buckets that have MFA delete enabled.

Read-only commands (AWS CLI):

aws s3api list-buckets --query 'Buckets[].Name' --output text
aws s3api get-bucket-versioning --bucket BUCKET_NAME

The output for a protected bucket shows Status: Enabled and MFADelete: Enabled. A bucket with no versioning returns nothing, and a versioned bucket without the protection shows the status without an enabled MFADelete line.

How to fix it

AWS states that only the bucket owner (the root user of the account that created the bucket) can enable MFA Delete, and that it cannot be enabled in the console: use the CLI or API. Have the root user's MFA device ready, then run (a change made by an administrator; ConfigCobra itself never changes your AWS account):

aws s3api put-bucket-versioning --bucket BUCKET_NAME \
  --versioning-configuration Status=Enabled,MFADelete=Enabled \
  --mfa "arn:aws:iam::ACCOUNT_ID:mfa/root-account-mfa-device 123456"

The value after the device ARN is the current six-digit code. For a hardware device, use its serial number in place of the ARN. Check the result with the read command above.

What changes when you fix it

Anyone, or any script, that permanently deletes object versions or suspends versioning on that bucket now has to supply an MFA code with the request. In practice only the root user can do this, so routine clean-up jobs run by roles or access keys will fail on permanent deletes.

AWS also states that MFA Delete cannot be used together with lifecycle configurations. If the bucket relies on lifecycle rules to expire old versions, decide which protection matters more for that bucket before you enable it. Normal reads, writes and uploads of new object versions are not affected.

Included in

BenchmarkCIS IDProfile
CIS Amazon Web Services Foundations v7.0.03.1.2Level 2

Check this on your AWS

ConfigCobra runs this check with every other control of the CIS Amazon Web Services Benchmarks, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial