Question: As AWS changes their root ssl cert for rds services 2019, the old certificate from 2015 looses its validity 03/2020. see <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html>

How to I configure sequalize to use the new rds-ca-2019 certificate?

```
// current sequalize aws rds configuration as of working with 2015 cert
var sequelizeConfig = {
  ...
  host: "xyz.rds.amazonaws.com",
  dialectOptions": {
    ssl: 'Amazon RDS'
  }
}

```

I could not figure any option for adding a certificate manually using [sequalize 3.x](https://sequelize.org/v3/api/sequelize/)

Answer: 
Ensure you update to the latest node mysql package, this may resolve the issue in future. 

As of now the new aws rds-ca-2019 ca certificate seems not yet to be merged. <https://github.com/mysqljs/mysql/pull/2280>

A temporary fix without ca validation:

```
var sequelizeConfig = {
  ...
  host: "xyz.rds.amazonaws.com",
  dialectOptions: {
    ssl: true
  }
}

```

and with certificate validation:

```
// get rds-ca-2019 certificate directly from aws https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem to ensure validity!!!
const fs = require('fs');
const rdsCa = fs.readFileSync(__dirname + '/rds-ca-2019-root.pem');

var sequelizeConfig = {
  ...
  host: "xyz.rds.amazonaws.com",
  dialectOptions: {
    ssl: {
      rejectUnauthorized: true,
      ca: [rdsCa]
    }
  }
}

```

thx @jarmod for linking and the post ["Best Security Practices for Amazon RDS with Sequelize" by soluto-nashville](https://medium.com/soluto-nashville/best-security-practices-for-amazon-rds-with-sequelize-600a8b497804) showing the solution
I think the `dialectOptions` parameter should not be defined inside the `pool` but outside. 

like this:

```
const sequelize = new Sequelize(dbname, username, password, {
  host: 'host name',
  dialect: 'mysql',
  dialectOptions: {
    ssl: 'Amazon RDS'
  },
  pool: {
    ...
  }
});

```

or like this:

```
const sequelize = new Sequelize(dbname, username, password, {
  host: 'host name',
  dialect: 'mysql',
  ssl: 'Amazon RDS'
  dialectOptions: {
    ...
  },
  pool: {
    ...
  }
});

```