Skip to content

AWS ECS Cluster does not enable logging of ECS Exec

Description

It is recommended to have a proper logging process for AWS ECS Cluster in order to track configuration changes conducted manually and programmatically and trace back unapproved changes.

Code Example

go
resource "aws_ecs_cluster" "pass2" {
  name = "white-hart"
  configuration {
    execute_command_configuration {
      # kms_key_id = aws_kms_key.example.arn
      logging = "DEFAULT"

      log_configuration {
        # cloud_watch_encryption_enabled = true
        # cloud_watch_log_group_name     = aws_cloudwatch_log_group.example.name

        # or
        # s3_bucket_name=   and
        # s3_bucket_encryption_enabled =true
      }
    }
  }
  tags = { test = "fail" }
}

Remediation

Terraform

Rule Details

FieldValue
IDIAC-0271
SeverityLOW
IaC TypeTerraform
FrameworksTerraform
Checkov IDCKV_AWS_223

References