For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/cloudformation-aws-redshift-publicly-accessible.md.
A documentation index is available at /llms.txt.
Redshift clusters must not be publicly accessible because exposure to the public internet increases the risk of unauthorized data access and expands the attack surface for brute-force or other network-based attacks. In AWS CloudFormation, AWS::Redshift::Cluster resources must include the PubliclyAccessible property and set it to false. Resources missing this property or with PubliclyAccessible set to true will be flagged as a security finding.
Secure configuration example:
MyRedshiftCluster:Type:AWS::Redshift::ClusterProperties:PubliclyAccessible:false# other required properties...
Compliant Code Examples
#this code is a correct code for which the query should not find any resultResources:myCluster:Type:"AWS::Redshift::Cluster"Properties:PubliclyAccessible:falseDBName:"mydb"MasterUsername:"master"MasterUserPassword:Ref:"MasterUserPassword"NodeType:"ds2.xlarge"ClusterType:"single-node"Tags:- Key:fooValue:bar