Within our company we’ve the wish to connect to an AWS RDS postgres database based on a generated IAM token. Mostly, we use DBeaver to connect to databases. However, with DBeaver a .pgpass is necessary to make the connection.
My question how can we achieve the connection with DBeaver towards our AWS RDS database using the IAM token?
Thanks in advance!
Gr,
Jeroen
2
Answers
You may be having issues due to not escaping the ‘:’ char in the IAM token (see https://www.postgresql.org/docs/current/libpq-pgpass.html for requirements).
I use the below powershell script to udpate .pgpass files for AWS Aurora and it works fine with DBeaver 22.2. Note the
$token = $token.Replace(':', ':');
line. Script is basic but could to adapted to other use cases.Here’s how I was able to get DBeaver Community Edition working with PostgreSQL PgPass and AWS IAM authentication:
DBeaver Connection Settings: