This rule ensures that S3 bucket default encryption is enabled with KMS for better security measures.
Rule | S3 bucket default encryption should be enabled with KMS |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ Medium |
Rule Description
The rule requires that default encryption is enabled for Amazon S3 buckets using AWS Key Management Service (KMS) with NIST 800-53 Revision 5 compliance.
Troubleshooting Steps
If default encryption with KMS is not enabled for S3 buckets, follow these troubleshooting steps:
Necessary Codes
No additional codes are required for this configuration. However, here are the necessary AWS CLI commands for verification and remediation:
aws s3api get-bucket-encryption --bucket <bucket_name>
aws s3api put-bucket-encryption --bucket <bucket_name> --server-side-encryption-configuration '{"Rules": [{"ApplyServerSideEncryptionByDefault": {"SSEAlgorithm": "aws:kms", "KMSMasterKeyID":"<kms_key_id>"}}]}'
Note: Replace
<bucket_name>
with your actual S3 bucket name and <kms_key_id>
with the ID of the KMS key you want to use for encryption.Step-by-Step Guide for Remediation
Follow these steps to enable default encryption with KMS for an S3 bucket:
Verify current encryption settings:
aws s3api get-bucket-encryption --bucket <bucket_name>
Create or identify a KMS key:
Enable default encryption with KMS:
aws s3api put-bucket-encryption --bucket <bucket_name> --server-side-encryption-configuration '{"Rules": [{"ApplyServerSideEncryptionByDefault": {"SSEAlgorithm": "aws:kms", "KMSMasterKeyID":"<kms_key_id>"}}]}'
<bucket_name>
with the name of the S3 bucket you want to enable default encryption for.<kms_key_id>
with the ID of the KMS key you want to use for encryption.Verify the encryption configuration:
aws s3api get-bucket-encryption --bucket <bucket_name>
Once you have completed these steps, default encryption with KMS will be enabled for the specified S3 bucket, meeting the NIST 800-53 Revision 5 compliance requirement.