Skip to content

Instantly share code, notes, and snippets.

@realshadow
Last active June 16, 2020 18:12
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realshadow/7ad7acae893940cb481575281de88e99 to your computer and use it in GitHub Desktop.
Save realshadow/7ad7acae893940cb481575281de88e99 to your computer and use it in GitHub Desktop.
How to setup IAM JDBC driver in Datagrip

Build the driver

Add the driver to Datagrip

  • open database tool window
  • add new or edit existing data source
  • under Drivers section, duplicate the PostgreSQL driver, name it PostgreSQL IAM
  • in the duplicated driver, add new driver files and navigate to the build folder created in previous step and choose iam-jdbc-driver-0.1.6-SNAPSHOT-all.jar
  • under classes choose io.magj.iamjdbcdriver.PostgreSqlIamAuthJdbcDriverWrapper
  • add new URL template - jdbc:iampostgresql://[{host::localhost}[:{port::5432}]][/{database:database}]/
  • apply changes
  • go back go your data source and change driver from PostgreSQL to PostgreSQL IAM
  • under connection settings change URL from jdbc:postgresql to jdbc:iampostgresql and append query string add the end with your credentials via awsProfile={profile} or awsAccessKeyId={access_key} and awsSecretAccessKey={secret}; however for me personally awsAccessKeyId and awsSecretAccessKey did not for me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment