sql_exporter icon indicating copy to clipboard operation
sql_exporter copied to clipboard

Connection to Postgresql hosted on AWS RDS using assume role and IAM

Open arthurzenika opened this issue 1 year ago • 2 comments

Looking at https://go.dev/wiki/SQLDrivers I don't see a reference to iam/passwordless based connexion to Postgresql hosted on RDS. Is this possible with sql_exporter ?

A quick search leads me to other projets such as https://github.com/labd/go-rds-iam and https://github.com/krotscheck/go-rds-driver ... do you think they would be "compatible" with sql_exporter ? (sorry not a golang developer)

arthurzenika avatar Jan 30 '24 10:01 arthurzenika

Hey @arthurzenika, unfortunately I don't have any experience with that. It seems that it would be possible to implement it based on other discussions I found (https://github.com/califlower/golang-aws-rds-iam-postgres/issues/5), so it seems that it would definitely need some code changes.

For now I'd say it's not supported. If someone wants to take this up and implement it we would support it.

dewey avatar Jan 30 '24 11:01 dewey

Hi @dewey, hope you are well.

Here is a first attempt to contributing some rds+postgres+iam specific code. I am not a golang dev so I hope I didn't do anything wrong, feel free to correct or as me for corrections. (especially the vendor stuff which I am not used to)

arthurzenika avatar Mar 20 '24 15:03 arthurzenika