-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
awsCaBundle not working as intended for import RDS cert #2869
Comments
@wellwelwel Steps for reproduction const mysql = require('promise-mysql');
const awsCaBundle = require('aws-ssl-profiles');
const connection = await mysql.createConnection{(
host: response.host,
port: response.port,
user: response.username,
password: response.password,
timezone: 'Z',
ssl: await awsCaBundle
}) If you use this way to connect to an RDS instance, it won't connect. Please let me know if you any additional details |
Hi, @mrajasekar-godaddy 🙋🏻♂️
At first, I thought that So, everything works for me: import mysql from 'promise-mysql';
import ssl from 'aws-ssl-profiles';
const connection = await mysql.createConnection({
host: '***',
user: '***',
password: '***',
database: '***',
timezone: 'Z',
ssl,
// ssl: {
// ca: ssl.ca,
// rejectUnauthorized: false,
// },
});
const [rows] = await connection.query('SELECT 1 + 1 AS `total`');
console.log(rows);
await connection.end(); About aws-ssl-profiles, it just exports an array of strings. The error seems to come from a
Unfortunately, promise-mysql no longer seems to be maintained: CodeFoodPixels/node-promise-mysql#172. |
@wellwelwel Thanks for checking it and getting back. Appreciate it But, I'm using CJM where I use Correct, this
|
Also, Thanks for sharing that the 'promise-mysql' library is no longer active. |
@mrajasekar-godaddy, If you can share your solution approach, that would be great 🙋🏻♂️ |
Hi Team,
Currently We are using promise-mysql which is a wrapper function of mysqljs
Currently when I use ssl: awsCaBundle to pull in the new cert in 2 possible ways
host: response.host, port: response.port, user: response.username, password: response.password, timezone: 'Z', ssl: { ca: awsCaBundle.ca, }, database: 'Hub' }
and
host: response.host, port: response.port, user: response.username, password: response.password, timezone: 'Z', ssl: awsCaBundle, database: 'Hub' }
Both doesn't work and it fails to connect to the Database.
Can someone help on this ? Is there is an issue with the imports ? or the way it's accessed.
CC: @wellwelwel For visibility
The text was updated successfully, but these errors were encountered: