Description
Place Redshift in an approved subnet group with security groups from the same VPC. Check the deployed settings if the template omits them. The VPC’s default security group may apply.
Potential impact
Subnets and security groups from different VPCs can prevent deployment. Broad inbound rules can allow connections from unintended clients.
Remediation
Check PubliclyAccessible, routes, inbound rules and database authentication. Changing ClusterSubnetGroupName replaces an existing cluster. Review the change set. For a side-by-side migration, use a distinct cluster identifier and keep the source until you verify data and connections on the replacement.
Examples
The second excerpt groups two subnets and attaches an existing security group. Supply references from the same VPC, a node type, cluster type and credentials in the full template.
Before
Resources:
RedshiftCluster:
Type: AWS::Redshift::Cluster
Properties:
ClusterIdentifier: tf-redshift-cluster
DBName: mydb
After
Resources:
RedshiftSubnetGroup:
Type: AWS::Redshift::ClusterSubnetGroup
Properties:
Description: Subnet group for Redshift
SubnetIds:
- !Ref Subnet1
- !Ref Subnet2
RedshiftCluster:
Type: AWS::Redshift::Cluster
Properties:
ClusterIdentifier: tf-redshift-cluster
DBName: mydb
ClusterSubnetGroupName: !Ref RedshiftSubnetGroup
VpcSecurityGroupIds:
- !Ref RedshiftSecurityGroup