Amazon S3 buckets can be unversioned, have versioning enabled, or have versioning suspended.
When an S3 bucket is unversioned or has versioning suspended, uploading a new object overwrites the previous one instead of preserving prior versions. The rule flags buckets without versioning enabled, including when the versioning property is omitted and defaults to disabled.
Objects can be permanently overwritten or deleted without the ability to restore previous versions. This can result from accidental changes, misconfiguration, or malicious activity.
Buckets that store information requiring long-term preservation become vulnerable to unintentional or intentional information loss when versioning is not enabled.
Versioning is disabled when the property is omitted or explicitly set to disable versioning, so new object uploads overwrite existing ones.
Versioning is disabled by default:
AWSTemplateFormatVersion: 2010-09-09
Resources:
S3Bucket:
Type: 'AWS::S3::Bucket' # Noncompliant
Properties:
BucketName: "Example"
Versioning is enabled:
AWSTemplateFormatVersion: 2010-09-09
Resources:
S3Bucket:
Type: 'AWS::S3::Bucket'
Properties:
BucketName: "Example"
VersioningConfiguration:
Status: Enabled