EKS clusters should have audit logging enabled
Checks that the EKS cluster sends the audit control plane log type to CloudWatch Logs, recording which users, administrators and system components changed the cluster, for investigation and audit. Turning on other log types, such as api or authenticator, does not count.
- service
- EKS
- severity
- Medium
- scope
- evaluated in every region
How to fix it
In the console
EKS → Clusters → the cluster → Cluster monitoring → Control plane logging
- Audit
- On; the other log types are optional
With the AWS CLI
aws eks update-cluster-config --name <cluster-name> --logging '{"clusterLogging":[{"types":["audit"],"enabled":true}]}' --region <region>With Terraform
- Overwrites existing settings: enabled_cluster_log_types is the cluster's whole set of log types, so keep any it already sends, such as api or authenticator, in the list.
resource "aws_eks_cluster" "this" {
name = "example"
role_arn = aws_iam_role.eks_cluster.arn
enabled_cluster_log_types = ["audit"]
vpc_config {
subnet_ids = var.subnet_ids
}
}
See which of your accounts this check is failing on.
Book a live scan