All checks
Medium RDS · regional

RDS for MariaDB DB instances should publish logs to CloudWatch Logs

Verifies that RDS for MariaDB DB instances publish the error log to CloudWatch Logs, where it is kept durably for audits and for diagnosing availability issues.

service
RDS
severity
Medium
scope
evaluated in every region

How to fix it

In the console

RDS → Databases → the MariaDB DB instance → Modify → Log exports

Error log
Selected; MariaDB writes this log by default, so nothing else needs to change

With the AWS CLI

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

With Terraform

  • Overwrites existing settings: enabled_cloudwatch_logs_exports is the complete list, so include every log type the instance already exports or the apply turns the others off.
resource "aws_db_instance" "this" {
  instance_class                  = var.instance_class
  enabled_cloudwatch_logs_exports = ["error"]
}

See which of your accounts this check is failing on.

Book a live scan