skip to Main Content

I get a timeout when trying to connect to my newly set up amazon redshift database.
I tried telnet:

telnet redshift-cluster-1.foobar.us-east-1.redshift.amazonaws.com 5439

With the same result.

I set the database configuration to "Publicly accessible".

Note that I am just experimenting. I have set up aws services for fun before, but don’t have much knowledge of the network and security setup. So I expect it to be a simple mistake I make.

I want to keep it simple, so my goal is just to connect to the database from a local SQL client and I don’t care about anything else at this stage 🙂

It would be great if you could give me some pointers for me to understand what the problem could be and what I should try next.

subnets

2

Answers


  1. Chosen as BEST ANSWER

    I had to add a new inbound rule to the security group and set the source to "anywhere-ipv4" or "my ip". The default inbound rule has a source with the name of the security group itself, which might mean that it is only accessible from within the VPC. At least it is not accessible from the outside.

    I set the protocol to tcp and type to redshift, which seemed like the sensible choice for my use case.

    See the picture for a sample configuration.

    enter image description here


  2. Another option you can try is to connect to it through an API. To connect to this database using a Java client, you need these values:

       private static final String database = "dev";
       private static final String dbUser ="awsuser";
       private static final String clusterId = "redshift-cluster-1";
    

    I have never experienced an issue when using the RedshiftDataClient.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search