🛡️ AWS RDS Instance database logging is not enabled🟢
- Contextual name: 🛡️ Instance database logging is not enabled🟢
- ID:
/ce/ca/aws/rds/instance-cloudwatch-logs-export - Tags:
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
RELIABILITY
Logic
Similar Policies
- AWS Security Hub: [RDS.9] RDS DB instances should publish logs to CloudWatch Logs
- AWS Security Hub: [RDS.36] RDS for PostgreSQL DB instances should publish logs to CloudWatch Logs
- AWS Security Hub: [RDS.40] RDS for SQL Server DB instances should publish logs to CloudWatch Logs
Description
Description
This policy identifies AWS RDS Instances that are not configured to export database logs to Amazon CloudWatch Logs. Enabling log exports ensures that relevant database activity and operational events are captured and centrally stored for monitoring and analysis.
Rationale
Exporting database logs to Amazon CloudWatch Logs is essential for maintaining operational visibility and supporting security and compliance requirements. Logs stored locally on an RDS instance are transient and may be lost during maintenance activities, instance restarts, or unexpected failures. CloudWatch Logs provides durable, centralized log storage that preserves historical data for analysis and auditing.
Once logs are available in CloudWatch, organizations can create metric filters and alarms to detect notable events such as repeated connection failures, unauthorized access attempts, or performance issues like slow queries. Additionally, CloudWatch Logs Insights enables efficient searching and analysis of log data across multiple RDS instances, improving troubleshooting and incident response.
... see more
Remediation
Remediation
Enable CloudWatch Log Exports
To ensure database logs are retained and available for monitoring and auditing, configure AWS RDS Instances to export supported log types to Amazon CloudWatch Logs. The available log types depend on the database engine.
To enable CloudWatch log exports for an RDS instance, update the instance configuration using the
--cloudwatch-logs-export-configurationparameter. This parameter specifies which database log types are sent to Amazon CloudWatch Logs.Note: Changes to
--cloudwatch-logs-export-configurationare applied immediately by AWS. The--apply-immediatelyor--no-apply-immediatelyoptions have no effect on this modification.From Command Line
MySQL / MariaDB
aws rds modify-db-instance \
--region {{region}} \
--db-instance-identifier {{instance-id}} \
--cloudwatch-logs-export-configuration '{"EnableLogTypes":["error","general","slowquery","audit"]}'
PostgreSQL
aws rds modify-db-instance \
--region {{region}} \
... [see more](remediation.md)