0

I'm trying to follow this tutorial https://www.cdata.com/kb/tech/awsmanagement-jdbc-squirrel-sql.rst in order to connect to Redshift via SQuirrel SQL. In particular I'm trying to connect via Access Key ID and Secret Access Key.

When it comes to the Driver properties tab and need to insert the 2 keys, I struggle to set the 2 Values:

Driver properties

I try to click in the Value field but it simply doesn't allow me to insert any value.

Anyone had similar problem and resolved?

Vzzarr
  • 4,600
  • 2
  • 43
  • 80

1 Answers1

0

I found a workaround by using a Driver with SDK (for other versions: https://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html#jdbc-previous-versions-with-sdk) and specifying the IAM credentials in the connection URL, so structured:

jdbc:redshift:iam://{cluster-name}:{aws-region}/{db-name}?DbUser={username}&AccessKeyID={access-key-ID}&SecretAccessKey={secret-access-key}&AutoCreate=true

and replacing the fields in brackets (the final part &AutoCreate=true is optional and necessary only if it's the first time accessing with the {username} user and is desired to create it as a new user in the DB (for other fields refer to https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc-and-odbc-options-for-database-credentials.html).

I figured it out with the help of https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-configure-jdbc-odbc.html at step 3, based on their example: jdbc:redshift:iam://examplecluster:us-west-2/dev?AccessKeyID=AKIAIOSFODNN7EXAMPLE&SecretAccessKey=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Vzzarr
  • 4,600
  • 2
  • 43
  • 80