Skip to main content

More Info:

Amazon Redshift clusters should not be using port 5439 (default port) for database access.

Risk Level

Informational

Address

Security

Compliance 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
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration of Redshift clusters using default port in AWS, follow these steps using the AWS Management Console:
  1. Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/) and log in to your account.
  2. Navigate to Amazon Redshift: Click on the “Services” dropdown menu at the top left corner, then select “Redshift” under the “Analytics” section.
  3. Select the Redshift Cluster: From the list of Redshift clusters, select the cluster that is using the default port that you want to change.
  4. Modify the Cluster: In the cluster details page, click on the “Cluster” menu on the left side, then click on the “Modify” button at the top.
  5. Change the Port: Scroll down to the “Network and security” section, locate the “Cluster port” field, and change the port number from the default port (5439) to a custom port of your choice. Make sure the new port is not being used by any other service.
  6. Apply Changes: After changing the port number, scroll down to the bottom of the page and click on the “Modify cluster” button to apply the changes.
  7. Monitor the Modification: The modification process may take a few minutes to complete. You can monitor the progress on the cluster details page.
  8. Verify the Port Change: Once the modification is completed, you can verify that the Redshift cluster is now using the custom port by checking the cluster details.
By following these steps, you have successfully remediated the misconfiguration of Redshift clusters using the default port in AWS.

To remediate the misconfiguration of Redshift clusters using the default port in AWS, you can follow these steps using the AWS CLI:Step 1: List the existing Redshift clusters to identify the clusters using the default port (5439) by running the following command:
Step 2: Identify the Redshift cluster for which you want to update the port and make a note of the Cluster Identifier.Step 3: Modify the cluster to change the port using the modify-cluster command. Replace <cluster-identifier> with the actual Cluster Identifier and <new-port> with the desired port number (e.g., 5432) by running the following command:
Step 4: Verify the port change by describing the cluster again and checking if the port has been updated successfully:
By following these steps, you can remediate the misconfiguration of Redshift clusters using the default port in AWS Redshift using the AWS CLI.
To remediate the misconfiguration of Redshift clusters using the default port in AWS, you can use the AWS SDK for Python (Boto3) to update the cluster’s port to a non-default value. Here are the step-by-step instructions to remediate this misconfiguration:
  1. Install Boto3: If you haven’t already installed the Boto3 library, you can install it using pip:
  2. Update Redshift Cluster Port: Use the following Python script to update the port for your Redshift cluster. Replace <cluster_id> with the ID of your Redshift cluster and <new_port> with the desired non-default port value:
  3. Run the Python Script: Save the above script in a file (e.g., update_redshift_port.py) and run it using Python:
  4. Verify the Port Update: You can verify that the port for your Redshift cluster has been updated successfully by checking the cluster details in the AWS Management Console or by running describe-cluster CLI command.
By following these steps, you can remediate the misconfiguration of Redshift clusters using the default port in AWS.
Changing the port argument will cause AWS to reboot the cluster, resulting in a temporary outage, but it does not force Terraform to replace the cluster. After applying, you must update client connection strings and security group rules to use the new port.Verification: terraform plan should show ~ port: "5439" => "YOUR_NON_DEFAULT_PORT" for the aws_redshift_cluster.THIS_CLUSTER resource.

Additional Reading: