Redshift configuration enables public access

Review whether Redshift needs public access, alongside private connection paths, restricted inbound rules and database authentication.

Description

publicly_accessible: yes lets Redshift accept internet connections where routes and security groups allow them. Database credentials and permissions still govern access to data.

Potential impact

A reachable endpoint gives outside clients a chance to sign in. Compromised credentials can expose the data that account can read.

Remediation

  • For a private-only cluster, prepare a private path for required clients, then set publicly_accessible: false. Allow only those clients to reach the cluster’s database port. If public access is required, restrict its sources.
  • For an existing cluster, use an update that supports publicly_accessible, such as the AWS ModifyCluster API. In community.aws 11.1.0, neither rerunning create nor using modify updates this setting.
  • Check the deployed setting. Test an authorized query over TLS from an approved client and confirm that an unapproved source cannot connect.

Examples

For this new single-node cluster, supply a redshift_single_node_type supported by the module and the target Region. Load redshift_admin_password from a secret store and check the subnet and security groups.

Before

yaml
- name: Basic cluster provisioning example
  community.aws.redshift:
    command: create
    node_type: "{{ redshift_single_node_type }}"
    cluster_type: single-node
    identifier: new-cluster
    username: cluster_admin
    password: "{{ redshift_admin_password }}"
    encrypted: true
    publicly_accessible: yes

yes requests a public endpoint for new-cluster.

After

yaml
- name: Basic cluster provisioning example
  community.aws.redshift:
    command: create
    node_type: "{{ redshift_single_node_type }}"
    cluster_type: single-node
    identifier: new-cluster
    username: cluster_admin
    password: "{{ redshift_admin_password }}"
    encrypted: true
    publicly_accessible: false

false creates a private endpoint. Both tasks enable encryption at rest.

References