Use postgres_fdw user mapping with AWS IAM role?

Viewed 131

In order to execute a query on a local PostgreSQL database (v10.14; Amazon RDS) that fetches data from a remote database, also PostgreSQL (RDS), we're using the foreign data wrapper (FDW) postgres_fdw server and user mapping. Currently the user mapping contains user/password credentials for the remote RDS, stored with the user mapping in the local RDS. To become more secure we would like to get rid of the stored credentials.

One way of doing so that we could imagine is using the IAM role of the local RDS to connect to the remote RDS. The question is, is that possible with postgres_fdw, are there maybe other FDWs with the same feature set as postgres_fdw and allow IAM authentication?

Are there other ways to set up an FDW like this without storing the credentials inside the local RDS?

0 Answers
Related