Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: S3 Bucket Versioning Should Be Enabled

Ensure compliance by enabling versioning for S3 buckets to maintain data integrity and security.

RuleS3 bucket versioning should be enabled
FrameworkCISA-cyber-essentials
Severity
High

Rule Description

S3 bucket versioning should be enabled for CISA-cyber-essentials to help protect against accidental deletion or overwriting of objects. Enabling versioning allows you to preserve, retrieve, and restore every version of an object in your bucket.

Troubleshooting Steps

Step 1: Check if versioning is enabled for the S3 bucket associated with CISA-cyber-essentials.

Step 2: If versioning is not enabled, proceed to enable it.

Step 3: Verify if versioning is successfully enabled.

Necessary Codes

No specific code is required for this rule. AWS CLI commands are used to enable or check the status of S3 bucket versioning.

Step-by-Step Guide for Remediation

Enabling S3 Bucket Versioning

Step 1: Open the AWS CLI or any terminal tool with AWS CLI configured.

Step 2: Run the following command to enable versioning for the S3 bucket:

aws s3api put-bucket-versioning --bucket cisa-cyber-essentials --versioning-configuration Status=Enabled

Replace

cisa-cyber-essentials
with the name of the S3 bucket you want to enable versioning for.

Step 3: Verify if versioning is successfully enabled by running the following command:

aws s3api get-bucket-versioning --bucket cisa-cyber-essentials

This command will provide the versioning configuration details for the specified bucket. Make sure the

Status
is set to
Enabled
.

Disabling S3 Bucket Versioning (Optional)

If you need to disable versioning for any reason, follow these steps.

Step 1: Open the AWS CLI or any terminal tool with AWS CLI configured.

Step 2: Run the following command to disable versioning for the S3 bucket:

aws s3api put-bucket-versioning --bucket cisa-cyber-essentials --versioning-configuration Status=Suspended

Replace

cisa-cyber-essentials
with the name of the S3 bucket you want to disable versioning for.

Step 3: Verify if versioning is successfully disabled by running the following command:

aws s3api get-bucket-versioning --bucket cisa-cyber-essentials

This command will provide the versioning configuration details for the specified bucket. Make sure the

Status
is set to
Suspended
.

Conclusion

Enabling versioning for S3 buckets is crucial for maintaining data integrity and protecting against accidental data loss. By following the provided steps, you can easily enable or disable versioning for the CISA-cyber-essentials bucket. Remember to always verify the status of versioning after enabling or disabling it.

Is your System Free of Underlying Vulnerabilities?
Find Out Now