All checks
Medium RDS · regional

Aurora PostgreSQL DB clusters should publish logs to CloudWatch Logs

Verifies that Aurora PostgreSQL DB clusters publish the postgresql log to CloudWatch Logs, where it is kept durably and can be searched and alarmed on. The export does not decide what is logged: the log_statement and log_min_duration_statement parameters do.

service
RDS
severity
Medium
scope
evaluated in every region

How to fix it

In the console

RDS → Databases → the Aurora PostgreSQL cluster → Modify → Log exports

PostgreSQL log
Selected; the instance and IAM database authentication error logs do not clear this check

With the AWS CLI

aws rds modify-db-cluster --db-cluster-identifier <db-cluster-identifier> --cloudwatch-logs-export-configuration '{"EnableLogTypes":["postgresql"]}' --region <region>

With Terraform

  • Overwrites existing settings: enabled_cloudwatch_logs_exports is the complete list, so include every log type the cluster already exports or the apply turns the others off.
resource "aws_rds_cluster" "this" {
  cluster_identifier              = var.cluster_identifier
  engine                          = "aurora-postgresql"
  enabled_cloudwatch_logs_exports = ["postgresql"]
}

See which of your accounts this check is failing on.

Book a live scan