rds-iam-pg

2.0.0 • Public • Published

rds-iam-pg

Convenience functions for connecting to RDS Postgres using IAM auth.

The createRdsPgPool() function uses AWS credentials present in the environment or filesystem to create a signed token to authenticate with RDS Postgres using IAM authentication.

It works in Lambda and any other Node environment.

Usage

import { createRdsPgPool } from 'rds-iam-pg'

const pgPool = createRdsPgPool({
  awsRegion: 'us-east-1',
  awsProfile: process.env.AWS_PROFILE,
  address: {
    host: 'your.rds.hostname.aws'
    port: 5432,
    user: 'yourusername',
    database: 'yourdb',
  },
})

License

This project is licensed under the Apache license, version 2.0.

Readme

Keywords

none

Package Sidebar

Install

npm i rds-iam-pg

Weekly Downloads

73

Version

2.0.0

License

Apache-2.0

Unpacked Size

9.99 kB

Total Files

14

Last publish

Collaborators

  • paulmelnikow
  • jbeard