2

I've set up a Redshift Serverless cluster w/ a workgroup and a namespace.

I turned on the "Publicly Accessible" option

I've created an inbound rule for the 5439 port w/ Source set to 0.0.0.0/0

I've created an IAM credential for access to Redshift

I ran aws config and added the keys

But when I run

aws redshift-data list-databases --cluster-identifier default --database dev --db-user admin --endpoint http://default.530158470050.us-east-1.redshift-serverless.amazonaws.com:5439/dev

I get this error:

Connection was closed before we received a valid response from endpoint URL: "http://default.XXXXXX.us-east-1.redshift-serverless.amazonaws.com:5439/dev".

In Node, when trying to use the AWS.RedshiftDataClient to do the same thing, I get this:

{
  code: 'TimeoutError',
  path: null,
  host: 'default.XXXXXXX.us-east-1.redshift-serverless.amazonaws.com',
  port: 5439,
  localAddress: undefined,
  time: 2022-07-09T02:20:47.397Z,
  region: 'us-east-1',
  hostname: 'default.XXXXXX.us-east-1.redshift-serverless.amazonaws.com',
  retryable: true
}

What am I missing?

RavenHursT
  • 2,336
  • 1
  • 25
  • 46
  • Did you turn on the **Public Accessible** option? See: [Creating a publicly accessible Amazon Redshift Serverless instance and connecting to it](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-connecting.html#serverless-publicly-accessible) – John Rotenstein Jul 09 '22 at 07:16
  • Yes. I did this as well. Should've mentioned that in the question. I'll add it. – RavenHursT Jul 11 '22 at 21:33
  • I had the same issue as you, I went into my VPC settings and disabled the CIDR that was associated with my IP address. Also make sure you have an internet gateway setup with a route table that accepts inbound traffic on 0.0.0.0/0 – Josh Dando Oct 19 '22 at 14:46

2 Answers2

2

What Security Group and VPC have you configured for your Redshift Serverless Cluster?

Make sure the Security Group allows traffic from "My Ip" so that you can reach the VPC.

If it is not enough, check the cluster is installed on public subnets (an Internet Gateway should be attached to the VPC and the route tables route traffic to it eventually + "Publicly Accessible" option enabled).

Francesco
  • 61
  • 6
0

I had the same issue. My security group inbound rule did not have 'My IP'. After adding that it started working.

55abhilash
  • 332
  • 2
  • 9