title: Connecting to RDS using aws-secretsmanager-jdbc with Node.js?
body: <p>Is there a way to connect to an RDS instance using the aws-secretsmanager-jdbc with node.js? I need to connect to a datasource and run a simple query, but unfortunately the only supported way to connect is using aws-secretsmanager-jdbc. </p>
  
  <p><a href="https://github.com/aws/aws-secretsmanager-jdbc" rel="nofollow noreferrer">https://github.com/aws/aws-secretsmanager-jdbc</a></p>
  
  <p>I was thinking I could use this node module to connect: <a href="https://www.npmjs.com/package/jdbc" rel="nofollow noreferrer">https://www.npmjs.com/package/jdbc</a>, like this:</p>
  
  <pre><code>var JDBC = require('jdbc');
  var jinst = require('jdbc/lib/jinst');
  
  if (!jinst.isJvmCreated()) {
    jinst.addOption("-Xrs");
    jinst.setupClasspath(['./drivers/hsqldb.jar',
                          './drivers/derby.jar',
                          './drivers/derbyclient.jar',
                          './drivers/derbytools.jar']);
  }
  
  var config = {
    url: 'jdbc-secretsmanager:postgresql://therdshost:1234/mydbname',
  
    // Not sure what to use for drivername here
    drivername: '',
    minpoolsize: 10,
    maxpoolsize: 100,
  
    user: 'myusername',
    password: '',
    properties: {}
  };
  
  
  var hsqldb = new JDBC(config);
  
  hsqldb.initialize(function(err) {
    if (err) {
      console.log(err);
    }
  });
  </code></pre>
  
  <p>Looking at jdbc-secretsmanager, it seems that this is a separate Java library. Is it possible to do this in node.js or must I use Java for this?</p>