S3 bucket must have versioning enabled

High AWS General aws-s3-bucket-versioning

Applies to

  • AWS::S3::Bucket

What CGPulse checks

A resource passes this rule when versioningEnabled must equal true. Anything else is reported as a finding with the evaluated property value attached as evidence.

How to fix it

Enable versioning to allow recovery from accidental deletions or overwrites. In AWS Console: S3 > Bucket > Properties > Bucket Versioning > Enable. See: https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html

CLI

aws s3api put-bucket-versioning --bucket "{name}" --versioning-configuration Status=Enabled

Terraform

resource "aws_s3_bucket_versioning" "{name}" {
  bucket = aws_s3_bucket.{name}.id
  versioning_configuration {
    status = "Enabled"
  }
}

Compliance frameworks

Is your environment compliant with this rule?

CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.

Run a free scan

Related AWS rules

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.