AWS RDS Postgres Cluster does not have query logging enabled
This policy identifies RDS Postgres clusters with query logging disabled.

In AWS RDS PostgreSQL, by default, the logging level captures login failures, fatal server errors, deadlocks, and query failures. To log data changes, we recommend enabling cluster logging for monitoring and troubleshooting. To obtain adequate logs, an RDS cluster should have log_statement and log_min_duration_statement parameters configured.

It is a best practice to enable additional RDS cluster logging, which will help in data change monitoring and troubleshooting.
This is applicable to aws cloud and is considered a informational severity issue.
Sample categories of findings relevant here are ['MISCONFIGURATION'].
Mitigation of this issue can be done as follows: 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 RDS console.
2. In the navigation pane, choose 'Parameter groups'.
3. In the list, choose the above-created parameter group that you want to modify.
4. For Parameter group actions, choose 'Edit'.
5. Change the value of the 'log_min_duration_statement parameter' to any value other than -1 you want to modify.
6. Change the value of 'log_statement' according to the requirements.
7. Choose 'Save Changes'.
8. Reboot the primary (writer) DB instance in the cluster to apply the changes to it.
9. Then reboot the reader DB instances to apply the changes to them.

Please create a custom parameter group if the cluster has only the default parameter group using the following steps:

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

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

1. Sign in to the AWS Management Console and open the Amazon RDS console.
2. In the navigation pane, choose 'Databases', and then choose the 'DB instance' that you want to modify.
3. Choose 'Modify'. The Modify DB instance page appears.
4. Under 'Additional Configuration', select the above-created cluster parameter group from the DB parameter group dropdown.
5. Choose 'Continue' and check the summary of modifications.
6. (Optional) Choose 'Apply immediately' to apply the changes immediately. Choosing this option can cause downtime in some cases.
7. On the confirmation page, review your changes. If they are correct, choose 'Modify DB instance' to save your changes..

Query:
```config from cloud.resource where api.name = 'aws-rds-db-cluster-parameter-group' AND json.rule = parameters.log_min_duration_statement.ParameterValue does not exist or parameters.log_min_duration_statement.ParameterValue equals -1 as X; config from cloud.resource where api.name= 'aws-rds-db-cluster' AND json.rule = status contains available and engine contains postgres as Y; filter '$.X.DBClusterParameterGroupName equals $.Y.dbclusterParameterGroup'; show Y;```