title: How do I connect with my redshift database?
body: <p>I am setting up a redshift database on AWS and I've followed the instructions on this article - <a href="https://chartio.com/resources/tutorials/connecting-to-a-database-within-an-amazon-vpc/" rel="nofollow noreferrer">https://chartio.com/resources/tutorials/connecting-to-a-database-within-an-amazon-vpc/</a></p>
  
  <p>I am unable to connect to the database.</p>
  
  <p>Here's my setup - </p>
  
  <p>I have a PostgreSQL database instance that I spun up with Amazon RDS. That is connected to an Amazon VPC with two subnets. </p>
  
  <p>Subnet A is set in us-east-2c. It is associated with a Route Table that has two routes. The first has destination 10.0.0.0/16, target 'local', status 'active' and propogated 'no'. The second has destination 0.0.0.0/0 and is targeted to an Internet Gateway associated with the VPC. </p>
  
  <p>Subnet B is set in us-east-2b. It has destination 10.0.0.0/16 and target 'local'.</p>
  
  <p>The PostgreSQL db is associated with a Security Group with this inbound rule: Type: Custom TCP Rule, Protocol: TCP, Port Range: 5432 and Source: 10.0.0.0/32. There are no outbound rules. </p>
  
  <p>Other details on the database:</p>
  
  <p>-Publicly Accessible is set to No</p>
  
  <p>-It is running in us-east-2b</p>
  
  <p>Additionally, there is an instance on EC2. It is on us-east-2c. </p>
  
  <p>It is associated with a Security Group with these inbound rules: </p>
  
  <p>First- Type: Custom TCP Rule, Protocol: TCP, Port Range: 5432, Source: 10.0.0.0/32</p>
  
  <p>Second- Type: SSH, Protocol: TCP, Port Range: 22, Source: (my-ip-address)/32</p>
  
  <p>Third- Type: SSH, Protocol: TCP, Port Range: 22, Source: (group id for the security group)</p>
  
  <p>Both of the Security Groups are associated with the same VPC that has the following settings: IPv4 CIDR: 10.0.0.0/16, IPv6 CIDR: (blank).</p>
  
  <p>My understanding of the set up is that the EC2 instance is public and I can SSH into that from my SQL client (Postico). And then, the EC2 instance will connect privately to the Redshift Database.</p>
  
  <p>Here's my problem-</p>
  
  <p>a) I've never set this up before and I may have done something completely wrong without knowing it.</p>
  
  <p>b) I am attempting to create an SSH connection from Postico. I do not know what value to fill in for 'Host' or 'Port'. Additionally, I do not know whether 'User' and 'Password' refer to the user and password for the account on my computer or whether it refers to something else altogether. </p>
  
  <p>My goal is simply to be able to have a PostgreSQL database that is unavailable to the public, but allows me to access it from my SQL client (Postico). </p>
  
  <p>I've attempted to research this problem, but there is a surprising lack of content that I was able to find to address these needs. I'm new to this, so if I'm missing required pieces to post this or if I've messed up in some way, please alert me and I will update accordingly.</p>