More Info:
Audit logging should be enabled for Redshift clusters for security and troubleshooting purposes.Risk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- HIPAA
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- Reserve Bank of India (RBI) Cyber Security Framework
- Reserve Bank of India (RBI) Master Direction – Information Technology Framework
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration of Redshift Cluster Audit logging not being enabled in AWS using the AWS Management Console, follow these step-by-step instructions:
- Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/console/) and log in with your credentials.
- Navigate to Amazon Redshift: Click on the “Services” dropdown menu at the top left corner of the console, then select “Redshift” under the Analytics section.
- Select the Redshift Cluster: In the Redshift dashboard, click on the Redshift cluster for which you want to enable audit logging.
- Modify Cluster: In the cluster details page, click on the “Cluster” dropdown menu at the top, then select “Modify Cluster”.
- Enable Audit Logging: Scroll down to the “Audit logging” section in the Modify Cluster settings.
- Enable Audit Logging: Check the box next to “Enable audit logging”.
- Choose S3 Bucket: Select an existing S3 bucket where you want to store the audit logs or create a new one.
- IAM Role: Choose an existing IAM role that has permission to write logs to the selected S3 bucket, or create a new IAM role with the required permissions.
- Encryption: Choose whether you want to encrypt the audit logs using AWS Key Management Service (KMS). If you choose to encrypt, select the KMS key to use.
- Save Changes: Scroll to the bottom of the page and click on the “Modify Cluster” button to save the changes.
- Monitor Audit Logs: Once the changes are saved, Redshift will start logging audit information to the specified S3 bucket. You can monitor the audit logs in the S3 bucket to ensure that the logging is working correctly.
Using CLI
Using CLI
To remediate the misconfiguration of Redshift Cluster Audit not having logging enabled in AWS using AWS CLI, you can follow these steps:Step 1: Enable Audit Logging for your Redshift ClusterReplace This command will return the current logging status of your Redshift cluster. Make sure that the Replace
<your-cluster-identifier> with the identifier of your Redshift cluster, <your-S3-bucket-name> with the name of the S3 bucket where you want to store the logs, and <prefix-for-logs> with the prefix you want to use for the log files.Step 2: Verify that Audit Logging is EnabledloggingEnabled parameter is set to true.Step 3: (Optional) Set the Retention Period for Logs
You can also set the retention period for your logs using the following command:<number-of-days> with the desired retention period for your log files.By following these steps, you can successfully remediate the misconfiguration of Redshift Cluster Audit not having logging enabled in AWS using AWS CLI.Using Python
Using Python
To remediate the misconfiguration of having logging disabled for an AWS Redshift cluster, you can use the AWS SDK for Python (Boto3) to enable logging for the Redshift cluster. Below are the step-by-step instructions to remediate this issue:
-
Install Boto3:
Ensure you have Boto3 installed in your Python environment. You can install it using pip:
- Configure AWS Credentials: Make sure you have configured your AWS credentials with the necessary permissions to modify Redshift clusters. You can set up your credentials using the AWS Command Line Interface (CLI) or by setting environment variables.
-
Write Python Script:
Create a Python script with the following code to enable logging for the Redshift cluster:
Replace
'your-redshift-cluster-identifier'with the actual identifier of your Redshift cluster and'your-s3-bucket-name'with the name of the S3 bucket where you want to store the logs. - Run the Script: Execute the Python script to enable logging for the specified Redshift cluster. Make sure the script runs successfully without any errors.
Using Terraform
Using Terraform
aws_redshift_cluster is an in-place update and does not force replacement of the cluster, but creating/changing the S3 bucket or its policy may affect other uses of that bucket if it is shared.For verification, terraform plan should show:- an in-place update to
aws_redshift_cluster.thisaddinglogging.enable = true,logging.bucket_name, andlogging.s3_key_prefix - creation (or update) of
aws_s3_bucket.redshift_logsandaws_s3_bucket_policy.redshift_logging.

