简体   繁体   中英

Why can't I connect to my AWS Redshift Serverless cluster from my laptop?

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?

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM