S3 general purpose buckets should have versioning enabled
Verifies that S3 buckets have versioning enabled.
- service
- S3
- severity
- Low
- scope
- evaluated once per account
How to fix it
Enable versioning on the bucket. It is one-way: versioning can be suspended later but never removed, and every version already stored stays billable. Deletes then write a delete marker instead of removing data. Enabling it also puts the bucket in scope for S3.10, which asks for a lifecycle rule to expire noncurrent versions.
In the console
S3 → the bucket → Properties → Bucket Versioning
With the AWS CLI
aws s3api put-bucket-versioning --bucket <bucket-name> --versioning-configuration Status=EnabledWith Terraform
resource "aws_s3_bucket_versioning" "this" {
bucket = var.bucket_name
versioning_configuration {
status = "Enabled"
}
}
See which of your accounts this check is failing on.
Book a demo