Closed mlg87 closed 3 years ago
using the the aws-sdk
directly, i tried the following:
const AWS = require('aws-sdk')
const data = new AWS.RDSDataService({
region: 'us-east-2'
});
const main = async () => {
const read = await data.executeStatement({
secretArn: 'arn:aws:secretsmanager:us-east-2:XXXXXXXXX:secret:blah-blah',
resourceArn: 'arn:aws:rds:us-east-2:XXXXXXXXXX:cluster:blah-blah',
database: 'postgres',
sql: 'SELECT * FROM users WHERE id = :id',
parameters: [
{ name: 'id', value: { stringValue: 'some-valid-uuid-for-a-user' } }
]
}).promise()
console.log('read', read);
}
main();
and got the same error, so i cast the id
param and it worked.
sql: 'SELECT * FROM users WHERE id = :id::uuid',
annoying, but i will find a way around
ive been trying to track down an answer to my issue all day. when running a simple query (looking up a user by id for instance) i am getting this error:
i just looked at the aws js sdk docs and noticed there is no param type that directly correlates to uuid
so my question is can this really not handle querying with a uuid?