S3 general purpose buckets should be encrypted at rest with AWS KMS keys
Checks that the S3 general purpose bucket's default encryption uses an AWS KMS key (SSE-KMS or DSSE-KMS) rather than SSE-S3, so reading an object also takes permission to use the key, and key use is logged in CloudTrail. Objects already stored keep their encryption. A bucket that receives server access logs must stay on SSE-S3.
- service
- S3
- severity
- Low
- scope
- evaluated once per account
How to fix it
- Can break clients: Uploads then need kms:GenerateDataKey and downloads kms:Decrypt on the key, so with a customer managed key, grant both to every principal that uses the bucket before you switch.
In the console
S3 → the bucket → Properties → Default encryption
- Encryption type
- Server-side encryption with AWS Key Management Service keys (SSE-KMS)
- AWS KMS key
- A symmetric key in the bucket's Region; a customer managed key if another account must read the objects
- Bucket Key
- Enable, to cut KMS request costs (not available with DSSE-KMS)
With the AWS CLI
aws s3api put-bucket-encryption --bucket <bucket-name> --server-side-encryption-configuration file://encryption.jsonWith Terraform
resource "aws_s3_bucket_server_side_encryption_configuration" "this" {
bucket = var.bucket_name
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
kms_master_key_id = var.kms_key_arn
}
bucket_key_enabled = true
}
}
See which of your accounts this check is failing on.
Book a live scan