dbInstanceIdentifier property of a Postgres AWS RDS Secret is not read from rds secret
blacksnow88 opened this issue · 2 comments
dbInstanceIdentifier property of a Postgres AWS RDS Secret is not read without specifying url.
To Reproduce
using dependency version: 1.0.12
on any spring boot application with these config:
spring:
dataSource:
driverClassName: com.amazonaws.secretsmanager.sql.AWSSecretsManagerPostgreSQLDriver
username: ##AWS_RDS_SECRET_NAME##
url: d##AWS_RDS_SECRET_NAME##
an error is thrown due to missing database name
Expected behavior
The Database Name should be read from dbInstance inbstead from dbName.
For Secret of type "Credentials for Amazon RDS Database" only stores the following fields:
username | password | engine | postgreshost | port | dbInstanceIdentifier
Environment:
Details about your environment (OS, Java version, AWS SDK version...)
OS: MacOS Sonoma
java version "17.0.9" 2023-10-17 LTS
aws-secretsmanager-jdbc version: 1.0.12
Additional context
on Class AWSSecretsManagerDriver line: 391
"JsonNode dbnameNode = jsonObject.get("dbname");"
Hi @blacksnow88. Can you provide a bit more information on the exact error you're getting?
The DB instance identifier is a different identifier completely separate from the DB name.
Closing the issue, @blacksnow88 - feel free to open a new ticket if you still believe this to be an issue.