What happens?
#457 added support for RDS IAM authentication, where the database password comes from calling the GenerateRDSAuthToken API. However, there's no parameters like profile, provider, and chain to set the underlying credentials used to call the API, like with S3 secrets. Only the default credentials provider chain and values in AWS_PROFILE, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY environment variables are supported. I am unable to configure the postgres secret to work with my AWS config.
To Reproduce
- Have a local AWS profile that uses SSO sessions. Set that profile as the
AWS_PROFILE environment variable.
- Create a
postgres secret for an RDS/Aurora instance with IAM-based authentication enable with aws_rds_iam_auth_enabled true.
- Attempt to attach to the PostgreSQL instance.
Example statements using the README values to hide connection details.
create or replace secret rds_secret (
type postgres,
host 'my-db-instance.xxxxxx.us-west-2.rds.amazonaws.com',
port 5432,
database 'postgres',
user 'my_iam_user',
aws_rds_iam_auth_enabled true,
aws_region 'us-west-2'
);
attach '' as rds_db (type postgres, secret rds_secret);
An IO Error occurs.
IO Error: Unable to connect to Postgres at "": connection to server at "my-db-instance.xxxxxx.us-west-2.rds.amazonaws.com" (10.x.x.x), port 5432 failed: fe_sendauth: no password supplied
With S3 secrets, I typically set the chain to 'env;sso to work with my AWS profiles.
create or replace secret s3 (
type s3,
provider credential_chain,
chain 'env;sso',
…
);
OS:
macOS
PostgreSQL Version:
17.5
DuckDB Version:
1.5.2
DuckDB Client:
DuckDB
Full Name:
King Chung Huang
Affiliation:
SensorUp
Have you tried this on the latest main branch?
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
What happens?
#457 added support for RDS IAM authentication, where the database password comes from calling the GenerateRDSAuthToken API. However, there's no parameters like profile, provider, and chain to set the underlying credentials used to call the API, like with S3 secrets. Only the default credentials provider chain and values in
AWS_PROFILE,AWS_ACCESS_KEY_ID, andAWS_SECRET_ACCESS_KEYenvironment variables are supported. I am unable to configure thepostgressecret to work with my AWS config.To Reproduce
AWS_PROFILEenvironment variable.postgressecret for an RDS/Aurora instance with IAM-based authentication enable withaws_rds_iam_auth_enabled true.Example statements using the README values to hide connection details.
An IO Error occurs.
With S3 secrets, I typically set the chain to
'env;ssoto work with my AWS profiles.OS:
macOS
PostgreSQL Version:
17.5
DuckDB Version:
1.5.2
DuckDB Client:
DuckDB
Full Name:
King Chung Huang
Affiliation:
SensorUp
Have you tried this on the latest
mainbranch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?