Skip to content

AWS CloudWatch Log groups encrypted using default encryption key instead of KMS CMK

Description

Log group data requires mandatory encryption settings in CloudWatch Logs. Developers can optionally use AWS Key Management Service for this encryption.

This approach has several limitations:

  • If you revoke CloudWatch Logs access to an associated CMK or delete an associated CMK, your encrypted data in CloudWatch Logs can no longer be retrieved.
  • You cannot associate a CMK with a log group using the CloudWatch console.

Code Example

go
resource "aws_cloudwatch_log_group" "pass" {
  ...
+ kms_key_id        = "someKey"
}

Remediation

Terraform

  • Resource: aws_cloudwatch_log_group
  • Arguments: kms_key_id

NOTE: Resource's ARN should be used.

Rule Details

FieldValue
IDIAC-0207
SeverityLOW
IaC TypeCloudformation
FrameworksCloudFormation, Terraform, TerraformPlan, Serverless
Checkov IDCKV_AWS_158

References