How to set-up Redshift Connection on dBeaver CE when using Configuration file on a Mac

0

I am trying to set-up a Redshift connection using dBeaver CE. I am trying to use the Configuration file option as described in the linked AWS Doc Using a Configuration Profile

You can supply the IAM credentials options and GetClusterCredentials options as  settings in named profiles in your AWS configuration 
file. To provide the profile name, use the Profile JDBC option. The configuration is stored in a file named config or a file named credentials 
in a folder named .aws in your home directory.

I have not been able to determine how to supply the GetClusterCredentials options as settings in the named profile that will allow me to connect to Redshift. I also looked at this Configuration and credential file settings doc, but not sure which of those are GetClusterCredentials options

I tried various combinations here as well - but no success https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-configure-jdbc-odbc.html

How should I supply the options so that I can use dBeaver to connect to Redshift to execute my SQLs instead of having to login to console all the time?

I was successfully able to run the below command on commandline and get the expected result

aws redshift get-cluster-credentials --cluster-identifier <cluster-name> --db-user <db-usernam> --db-name <db-name> --duration-seconds 3600 --profile <profile-name>

Can someone help me with what options do I need to provide on the url line to make it work? This is one of the examples from that document jdbc:redshift:iam://examplecluster:us-west-2/dev?Profile=user2

Thank you

  • Has anyone done this? Is it possible?

2 Answers
0

Hello, considering the Profile is configured for "user2" in the credentials file , the example URL that you have provided should be able to connect to Redshift using IAM credentials ( provided your other connectivity setup is correct). Basically, once all the supplied parameters are valid, the driver will call the GetClusterCredentials using those values. Firstly, please ensure you are using a JDBC driver that supports IAM authentication [4]. Additionally, to rule out if the issue is not specific to IAM authentication , can you also try to establish connection using native database user and see if it’s working. If that doest work as well, then probably it can be more related to general connectivity which can also be troubleshooted using resources available here [1][2][3] If that is not the case, then I would recommend to create a support case with Redshift support team as we would need to understand more details pertaining to your cluster and error that you are facing.

References [1] https://docs.aws.amazon.com/redshift/latest/mgmt/troubleshooting-connections.html [2]https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-to-cluster.html [3] https://docs.aws.amazon.com/redshift/latest/mgmt/configuring-connections.html [4]https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-download-driver.html

AWS
SUPPORT ENGINEER
answered 4 days ago
0

I was trying to put a comment, but it doesn't accept images

One other thing. I was able to establish the connection from SQLWorkbench from windows. But trying to set those on dBeaver did not work on Windows or Mac. I also could not get it to work on SQLWorkbench on Mac as ADFSCredentialsProvider is not supported on Mac

How could I translate the above to Mac - as I need Mac equivalent of the ADFSCredentialsProvider?

Any help in this regard is appreciated.

In the meantime, I will go through above links and to try and resolve the issue

JDBC Driver

Properties

Connection Success

adbdkb
answered 4 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions