Help Center/ Config/ User Guide/ Resource Compliance/ Built-In Policies/ Relational Database Service/ Both Error Logs and Slow Query Logs Are Collected for RDS Instances
Updated on 2025-08-25 GMT+08:00

Both Error Logs and Slow Query Logs Are Collected for RDS Instances

Rule Details

Table 1 Rule details

Parameter

Description

Rule Name

rds-instance-logging-enabled

Identifier

rds-instance-logging-enabled

Description

If neither error logs nor slow query logs are collected for an RDS instance, this instance is non-compliant.

Tag

rds

Trigger Type

Configuration change

Filter Type

rds.instances

Rule Parameters

None

Application Scenarios

The database audit function records all user operations on the database in real time. This function logs, analyzes, and reports user activities in the database. Based on the audit logs, you can prepare compliance reports and track incidents, improving data asset security. For details, see Enabling Database Audit for Post-Event Backtracking.

Solution

Configure audit log policies (including slow query logs, error logs, and SQL audit logs) for the RDS instance. For details, see Setting SQL Audit and Enabling SQL Audit.

Rule Logic

  • If slow query logs, error logs, and SQL audit logs are enabled for an RDS instance, this instance is compliant.
  • If slow query logs, error logs, and SQL audit logs are not enabled for an RDS instance, this instance is non-compliant.