Check if S3 bucket versioning is enabled to meet high severity compliance standards.
Rule | S3 bucket versioning should be enabled |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ High |
S3 Bucket Versioning for Compliance with NIST 800-53 Revision 5
NIST 800-53 Revision 5 requires that organizations implement data retention policies that support versioning in order to protect against unauthorized alterations and deletions. AWS S3 bucket versioning is a feature that aligns with this requirement. It maintains multiple variants of an object within an S3 bucket, which is crucial for data recovery and maintaining data integrity.
Understanding S3 Bucket Versioning
When S3 bucket versioning is enabled, every time an object is updated or deleted, a new version is created, enabling you to recover from both unintended user actions and application failures. Here's a detailed description of the rule:
Checking if Versioning is Enabled
To confirm if S3 bucket versioning is enabled on your buckets, you can use the AWS Management Console or AWS CLI.
AWS Management Console:
AWS CLI:
Execute the following command to retrieve the versioning status of the bucket:
aws s3api get-bucket-versioning --bucket YOUR_BUCKET_NAME
Replace
YOUR_BUCKET_NAME
with the name of your S3 bucket.Enabling Versioning on an S3 Bucket
If versioning is not enabled, follow these steps to enable it:
AWS Management Console:
AWS CLI:
To enable versioning via the command line interface, run:
aws s3api put-bucket-versioning --bucket YOUR_BUCKET_NAME --versioning-configuration Status=Enabled
Replace
YOUR_BUCKET_NAME
with the name of your bucket.Utilizing Lifecycle Policies and MFA Delete (Optional for Enhanced Security)
Lifecycle Policies
MFA Delete
MFA Delete requires the use of root account credentials and also MFA to permanently delete an object version:
aws s3api put-bucket-versioning --bucket YOUR_BUCKET_NAME --versioning-configuration Status=Enabled,MFADelete=Enabled --mfa "arn:aws:iam::account-id:mfa/device serial number MFA-code"
Replace the relevant details with your bucket information and MFA device information.
Troubleshooting Common Issues
Unauthorized Errors
Versioning Not Working as Expected
MFA Delete Problems
Following these guidelines will help you maintain compliance with NIST 800-53 Revision 5 by utilizing S3 bucket versioning effectively. By ensuring S3 buckets have versioning enabled, your organization will have an important recovery mechanism in place for critical data.