> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-documentdb-cluster-does-not-publish-audit-logs-to-cloudwatch-logs.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS DocumentDB cluster does not publish audit logs to CloudWatch Logs

### Synopsis

| Field               | Value                                                                 |
| ------------------- | --------------------------------------------------------------------- |
| Rule Type           | Detection                                                             |
| Finding Type        | AWS DocumentDB cluster does not publish audit logs to CloudWatch Logs |
| Finding ID          | 60000895                                                              |
| Generates a Finding | This detection rule also generates a finding                          |
| Severity            | Informational                                                         |
| Category            | CONFIGURATION                                                         |
| Cloud Providers     | AWS                                                                   |
| Platform Module     | CSPM                                                                  |
| Asset Types         | AMAZON\_DOCUMENT\_DB\_DATABASE\_CLUSTER                               |

### Description

Amazon DocumentDB clusters lacking CloudWatch Logs integration for audit logs present a significant security risk. This misconfiguration prevents centralized monitoring and analysis of database activities, hindering threat detection and incident response.

DocumentDB's audit logging feature allows tracking of database operations, crucial for security auditing and compliance. However, without publishing these logs to CloudWatch Logs, organizations lose the benefit of centralized log management and analysis. Attackers could exploit this lack of monitoring to remain undetected, potentially leading to data breaches or unauthorized access.

The impact of this misconfiguration is a blind spot in security monitoring, making it difficult to detect malicious activities within the DocumentDB cluster. Centralized logging in CloudWatch Logs facilitates efficient security analysis, alerting, and incident response, minimizing the impact of potential breaches. Publishing audit logs to CloudWatch enables comprehensive security monitoring and enhances threat detection capabilities.

To mitigate this risk, ensure all Amazon DocumentDB clusters are configured to enable audit logging and publish these logs to CloudWatch Logs. Regularly review the CloudWatch Logs for suspicious activities. Implement automated alerts based on specific events within the audit logs to promptly identify and respond to security incidents.

### Remediation

To create a custom parameter group if the cluster has only the default parameter group use the following steps:

1. Sign in to the AWS Management Console and open the Amazon DocumentDB console.
2. In the navigation pane, choose 'Parameter groups'.
3. Choose 'Create'. The 'Create cluster parameter group' window appears.
4. In the 'New cluster parameter group name', enter the name of the new DB cluster parameter group.
5. In the 'Family' list, select a 'DB parameter group family'.
6. In the Description box, enter a description for the new DB cluster parameter group.
7. Click 'Create'.

To modify the custom DB cluster parameter group to enable query logging, follow the below steps:

1. Sign in to the AWS Management Console and open the Amazon DocumentDB console.
2. In the navigation pane, choose 'Parameter groups'.
3. In the list, choose the above-created parameter group or the reported resource custom parameter group that you want to modify.
4. Click on the 'audit\_logs' parameter and click 'Edit'.
5. Change the value of the 'audit\_logs' parameter to any value (ddl,dml\_read,dml\_write, all) other than 'disabled' or 'none' you want to modify according to your requirements.
6. Choose 'Apply immediately' to apply the changes immediately or 'Apply during the next scheduled maintenance window' according to your requirements.
7. Choose 'Modify cluster parameter' to modify the values.

To modify an AWS DocumentDB cluster to use the custom parameter group, follow the below steps:

1. Sign in to the AWS Management Console and open the Amazon DocumentDB console.
2. In the navigation pane, choose 'Databases', and then choose the 'DB instance' that you want to modify.
3. Choose the reported cluster that you want to associate your parameter group with. Choose 'Actions', and then choose 'Modify' to modify your cluster.
4. Scroll down to 'Cluster options', select the above-created cluster parameter group from the DB parameter group dropdown.
5. Choose 'Continue' and check the summary of modifications.
6. Choose 'Apply immediately' to apply the changes immediately or 'Apply during the next scheduled maintenance window' according to your requirements.
7. On the confirmation page, review your changes. If they are correct, choose 'Modify cluster' to save your changes.

When the value of the audit\_logs cluster parameter is enabled, ddl, dml\_read, or dml\_write, you must also enable Amazon DocumentDB to export logs to Amazon CloudWatch. If you omit either of these steps, audit logs will not be sent to CloudWatch.

To modify an Amazon DocumentDB cluster for enabling export logs to cloudwatch, follow the below steps:

1. Sign in to the AWS Management Console and open the Amazon DocumentDB console.
2. In the navigation pane, choose 'Databases', and then choose the 'DB instance' that you want to modify.
3. Choose the reported cluster that you want to associate your parameter group with. Choose 'Actions', and then choose 'Modify' to modify your cluster.
4. Scroll down to the Log exports section, and choose 'Enable' for the 'Audit logs'.
5. Choose 'Continue'.
6. Choose 'Apply immediately' to apply the changes immediately or 'Apply during the next scheduled maintenance window' according to your requirements.
7. Choose 'Modify cluster'.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-documentdb-cluster-does-not-publish-audit-logs-to-cloudwatch-logs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
