Skip to main content

🛡️ AWS RDS Instance database logging is not enabled🟢

Logic

Similar Policies

Description

Open File

Description

This policy identifies standalone AWS RDS Instances that are not configured to export database logs to Amazon CloudWatch Logs. It applies to supported database engines, including MariaDB, MySQL, PostgreSQL, Oracle, and SQL Server. 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

Open File

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 and engine version.

To enable CloudWatch log exports for an RDS instance, update the instance configuration using the --cloudwatch-logs-export-configuration parameter. This parameter specifies which database log types are sent to Amazon CloudWatch Logs.

Note: Changes to --cloudwatch-logs-export-configuration are applied immediately by AWS. The --apply-immediately or --no-apply-immediately options have no effect on this modification.

From Command Line
MariaDB

Enable export of MariaDB error, general, slowquery, and audit logs:

aws rds modify-db-instance \
--region {{region}} \
--db-instance-identifier {{instance-id}} \
--cloudwatch-logs-export-configuration '{"EnableLogTypes":["error","general","slowquery","audit"]}'

... [see more](remediation.md)

policy.yaml

Open File

Linked Framework Sections

SectionSub SectionsInternal RulesPoliciesFlagsCompliance
💼 AWS Foundational Security Best Practices v1.0.0 → 💼 [RDS.9] RDS DB instances should publish logs to CloudWatch Logs1no data
💼 AWS Foundational Security Best Practices v1.0.0 → 💼 [RDS.36] RDS for PostgreSQL DB instances should publish logs to CloudWatch Logs1no data
💼 AWS Foundational Security Best Practices v1.0.0 → 💼 [RDS.40] RDS for SQL Server DB instances should publish logs to CloudWatch Logs1no data
💼 AWS Foundational Security Best Practices v1.0.0 → 💼 [RDS.42] RDS for MariaDB DB instances should publish logs to CloudWatch Logs1no data
💼 Cloudaware Framework → 💼 Logging and Monitoring Configuration78no data
💼 FedRAMP High Security Controls → 💼 AC-2(4) Automated Audit Actions (M)(H)23no data
💼 FedRAMP High Security Controls → 💼 AC-6(9) Log Use of Privileged Functions (M)(H)832no data
💼 FedRAMP High Security Controls → 💼 AU-2 Event Logging (L)(M)(H)27no data
💼 FedRAMP High Security Controls → 💼 AU-3 Content of Audit Records (L)(M)(H)139no data
💼 FedRAMP High Security Controls → 💼 AU-6(3) Correlate Audit Record Repositories (M)(H)17no data
💼 FedRAMP High Security Controls → 💼 AU-6(4) Central Review and Analysis (H)17no data
💼 FedRAMP High Security Controls → 💼 AU-10 Non-repudiation (H)16no data
💼 FedRAMP High Security Controls → 💼 AU-12 Audit Record Generation (L)(M)(H)274no data
💼 FedRAMP High Security Controls → 💼 CA-7 Continuous Monitoring (L)(M)(H)228no data
💼 FedRAMP High Security Controls → 💼 SC-7(10) Prevent Exfiltration (H)18no data
💼 FedRAMP High Security Controls → 💼 SI-4(20) Privileged Users (H)4957no data
💼 FedRAMP Low Security Controls → 💼 AU-2 Event Logging (L)(M)(H)27no data
💼 FedRAMP Low Security Controls → 💼 AU-3 Content of Audit Records (L)(M)(H)24no data
💼 FedRAMP Low Security Controls → 💼 AU-12 Audit Record Generation (L)(M)(H)74no data
💼 FedRAMP Low Security Controls → 💼 CA-7 Continuous Monitoring (L)(M)(H)128no data
💼 FedRAMP Moderate Security Controls → 💼 AC-2(4) Automated Audit Actions (M)(H)23no data
💼 FedRAMP Moderate Security Controls → 💼 AC-6(9) Log Use of Privileged Functions (M)(H)32no data
💼 FedRAMP Moderate Security Controls → 💼 AU-2 Event Logging (L)(M)(H)27no data
💼 FedRAMP Moderate Security Controls → 💼 AU-3 Content of Audit Records (L)(M)(H)139no data
💼 FedRAMP Moderate Security Controls → 💼 AU-6(3) Correlate Audit Record Repositories (M)(H)17no data
💼 FedRAMP Moderate Security Controls → 💼 AU-12 Audit Record Generation (L)(M)(H)74no data
💼 FedRAMP Moderate Security Controls → 💼 CA-7 Continuous Monitoring (L)(M)(H)228no data
💼 NIST CSF v2.0 → 💼 DE.AE-02: Potentially adverse events are analyzed to better understand associated activities51no data
💼 NIST CSF v2.0 → 💼 DE.AE-03: Information is correlated from multiple sources66no data
💼 NIST CSF v2.0 → 💼 DE.CM-01: Networks and network services are monitored to find potentially adverse events185no data
💼 NIST CSF v2.0 → 💼 DE.CM-02: The physical environment is monitored to find potentially adverse events28no data
💼 NIST CSF v2.0 → 💼 DE.CM-03: Personnel activity and technology usage are monitored to find potentially adverse events105no data
💼 NIST CSF v2.0 → 💼 DE.CM-06: External service provider activities and services are monitored to find potentially adverse events51no data
💼 NIST CSF v2.0 → 💼 DE.CM-09: Computing hardware and software, runtime environments, and their data are monitored to find potentially adverse events182no data
💼 NIST CSF v2.0 → 💼 ID.IM-01: Improvements are identified from evaluations47no data
💼 NIST CSF v2.0 → 💼 ID.IM-02: Improvements are identified from security tests and exercises, including those done in coordination with suppliers and relevant third parties62no data
💼 NIST CSF v2.0 → 💼 ID.IM-03: Improvements are identified from execution of operational processes, procedures, and activities62no data
💼 NIST CSF v2.0 → 💼 ID.RA-01: Vulnerabilities in assets are identified, validated, and recorded47no data
💼 NIST CSF v2.0 → 💼 ID.RA-07: Changes and exceptions are managed, assessed for risk impact, recorded, and tracked50no data
💼 NIST SP 800-53 Revision 5 → 💼 AC-2(4) Account Management _ Automated Audit Actions1523no data
💼 NIST SP 800-53 Revision 5 → 💼 AC-4(26) Information Flow Enforcement _ Audit Filtering Actions18no data
💼 NIST SP 800-53 Revision 5 → 💼 AC-6(9) Least Privilege _ Log Use of Privileged Functions1725no data
💼 NIST SP 800-53 Revision 5 → 💼 AU-2 Event Logging427no data
💼 NIST SP 800-53 Revision 5 → 💼 AU-3 Content of Audit Records31539no data
💼 NIST SP 800-53 Revision 5 → 💼 AU-6(3) Audit Record Review, Analysis, and Reporting _ Correlate Audit Record Repositories17no data
💼 NIST SP 800-53 Revision 5 → 💼 AU-6(4) Audit Record Review, Analysis, and Reporting _ Central Review and Analysis17no data
💼 NIST SP 800-53 Revision 5 → 💼 AU-10 Non-repudiation516no data
💼 NIST SP 800-53 Revision 5 → 💼 AU-12 Audit Record Generation44874no data
💼 NIST SP 800-53 Revision 5 → 💼 CA-7 Continuous Monitoring628no data
💼 NIST SP 800-53 Revision 5 → 💼 SC-7(9) Boundary Protection _ Restrict Threatening Outgoing Communications Traffic35no data
💼 NIST SP 800-53 Revision 5 → 💼 SC-7(10) Boundary Protection _ Prevent Exfiltration18no data
💼 NIST SP 800-53 Revision 5 → 💼 SI-3(8) Malicious Code Protection _ Detect Unauthorized Commands13no data
💼 NIST SP 800-53 Revision 5 → 💼 SI-4(20) System Monitoring _ Privileged Users12no data
💼 NIST SP 800-53 Revision 5 → 💼 SI-7(8) Software, Firmware, and Information Integrity _ Auditing Capability for Significant Events17no data
💼 PCI DSS v3.2.1 → 💼 10.2 Implement automated audit trails for all system components.7633no data
💼 PCI DSS v3.2.1 → 💼 10.6.2 Review logs of all other system components periodically based on the organization's policies and risk management strategy, as determined by the organization's annual risk assessment.9no data
💼 PCI DSS v4.0.1 → 💼 10.2.1 Audit logs are enabled and active for all system components and cardholder data.732no data
💼 PCI DSS v4.0.1 → 💼 10.4.2 Logs of all other system components are reviewed periodically.19no data
💼 PCI DSS v4.0 → 💼 10.2.1 Audit logs are enabled and active for all system components and cardholder data.7132no data
💼 PCI DSS v4.0 → 💼 10.4.2 Logs of all other system components are reviewed periodically.19no data