Registry / security / aws-ssl-profiles

aws-ssl-profiles

JSON →
library1.1.2jsnpmunverified

Provides pre-bundled AWS RDS SSL CA certificates for MySQL, MySQL2, and PostgreSQL clients in Node.js. Current stable version 1.1.2. Updated periodically when AWS rotates certificates. Eliminates the need to manually download and manage AWS RDS CA bundles. Includes a 'proxyBundle' for use with proxy servers. Supports both CommonJS and ESM. v1.x is stable and actively maintained. Differentiator: single dependency, zero-config integration with popular database drivers.

npm install aws-ssl-profiles
INSTALL
IMPORT
SIG · AWS-SSL-PROFILES
A
aws-ssl-profiles
securityjavascriptv1.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (awsCaBundle)
const awsCaBundle = require('aws-ssl-profiles');
import awsCaBundle from 'aws-ssl-profiles'; // wrong: default export is not ESM compatible before v1.1? Actually it is, but require is used in docs. ESM works: import awsCaBundle from 'aws-ssl-profiles'; but verify with your bundler.
Package exports a single object with 'ca' property containing the bundle string. Works with both require and import (ESM). Use named import for proxyBundle.
proxyBundle
const { proxyBundle } = require('aws-ssl-profiles');
const proxyBundle = require('aws-ssl-profiles').proxyBundle; // works but destructuring is idiomatic
Named export for proxy bundle. Requires Node >= 6.
default (awsCaBundle) with ESM
import awsCaBundle from 'aws-ssl-profiles';
import * as awsCaBundle from 'aws-ssl-profiles'; // this gets the module namespace, not the default
For ESM, default import works. For named imports, use destructuring.

Connects to AWS RDS MySQL using mysql2 with pre-bundled CA certificates from aws-ssl-profiles, ensuring SSL/TLS connection without manual CA file management.

const mysql = require('mysql2'); const awsCaBundle = require('aws-ssl-profiles'); const connection = mysql.createConnection({ host: 'your-db.region.rds.amazonaws.com', user: 'admin', password: process.env.DB_PASSWORD ?? '', database: 'mydb', ssl: awsCaBundle }); connection.query('SELECT 1', (err, results) => { if (err) throw err; console.log(results); }); connection.end();
Debug
Known issues
gotchaThe CA bundle object is not a string but an object with a 'ca' property. Passing it directly as the 'ssl' option works for mysql/mysql2/pg because they accept this format, but custom implementations might expect a string.
fix
If you need the raw CA string, use awsCaBundle.ca or spread the object: { ...awsCaBundle } or { ca: awsCaBundle.ca }.
affects: >=1.0.0
deprecatedThe 'proxyBundle' export is experimental and may change in future versions.
fix
Pin the version if relying on proxyBundle, or use the default bundle for standard scenarios.
affects: >=1.0.0
gotchaNode < 6 is not supported. Package uses features not available in older Node versions.
fix
Upgrade Node to 6.0.0 or later.
affects: >=1.0.0
Errors
Common errors & fixes
Error: unable to get local issuer certificate
Using the default CA bundle from Node instead of AWS RDS-specific CA.
fix
Pass awsCaBundle as the ssl option (e.g., ssl: awsCaBundle).
TypeError: awsCaBundle is not a function
Treating the default export as a function (e.g., calling awsCaBundle()), but it's an object.
fix
Use awsCaBundle directly as an object, not a function.
Module not found: Can't resolve 'aws-ssl-profiles'
Package not installed or missing from node_modules.
fix
Run: npm install --save aws-ssl-profiles
Upgrade
Version history
1.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
24
OpenAI (training)
1
Resources
aws-ssl-profiles — npm install aws-ssl-profiles · libregistry