-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDS Data API Execute Statement for postgres uses wrong secret value for database name #8577
Comments
The file is also not changed in the mentioned for positioning of the concept development. |
Thanks @fszymanski-blvd for reaching out and your patience here. The Do you have any updates on your end since posting this issue? I couldn't find any related public issues, but did find one internally referencing that error. It linked to these limitations using the RDS Data API and recommended using SCRAM for PostgreSQL password encryption. Not sure if that's helpful here but please let us know if that is something you've looked into. Otherwise if you're still seeing an issue, please share your debug logs (with any sensitive info redacted) by adding |
I haven't done any additional work as this was part of a POC to see if we could use the data api. As mentioned, the data api via the AWS console worked, so I wouldn't expect the issue to be a configuration for my setup. I noticed that the execture-statement CLI command allows for a database parameter to be passed and I might need to try that. The database is a required field in the secret so I thought that the CLI would grab that value (which is where I thought the error might have occurred). If I find some time I can try to get back to a test with the -database parameter and try to get some logs. |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
Describe the bug
I've created a Secrets Manager secret for testing the Data API with Aurora Postgres and I've confirmed that the secret is working in the console using the query editor.
When I try to run the following command:
aws rds-data execute-statement --resource-arn CLUSTER_ARN --secret-arn SECRET_ARN --sql "select * from information_schema.tables;"
it gives me the following error:
An error occurred (DatabaseErrorException) when calling the ExecuteStatement operation: ERROR: database "USERNAME" does not exist; SQLState: 3D000
where
USERNAME
is the value for the username in the secret.Expected Behavior
The data API runs successfully in the same way as the query editor.
Current Behavior
dbname is not being read correctly so the data API does not work at all.
Reproduction Steps
aws rds-data execute-statement --resource-arn CLUSTER_ARN --secret-arn SECRET_ARN --sql "select * from information_schema.tables;"
Possible Solution
No response
Additional Information/Context
No response
CLI version used
aws-cli/2.15.28
Environment details (OS name and version, etc.)
MacOS Sonoma 14.2.1
The text was updated successfully, but these errors were encountered: