@aws-sdk/rds-signer
    TypeScript icon, indicating that this package has built-in type declarations

    3.181.0 • Public • Published

    @aws-sdk/rds-signer

    NPM version NPM downloads

    Description

    This package provides utilities for interacting with RDS.

    Installation

    npm install @aws-sdk/rds-signer

    Getting Started

    Import

    ES6 import

    import { Signer } from "@aws-sdk/rds-signer";

    Or CommonJS import

    const { Signer } = require("@aws-sdk/rds-signer");

    Generate Authentication Token for RDS IAM Authentication

    const signer = new Signer({
      /**
       * Required. The hostname of the database to connect to.
       */
      hostname: "db.us-east-1.rds.amazonaws.com",
      /**
       * Required. The port number the database is listening on.
       */
      port: 8000,
      /**
       * Required. The username to login as.
       */
      username: "user1",
      /**
       * Optional. The AWS credentials to sign requests with. Uses the default credential provider chain in not specified.
       */
      credentials: fromNodeCredentialProvider(),
      /**
       * Optional. The region the database is located in. Uses the region inferred from the runtime if omitted.
       */
      region: "us-east-1",
      /**
       * Optional. The SHA256 hasher constructor to sign the request.
       */
      sha256: HashCtor,
    });
    
    const token = await signer.getAuthToken();
    // Use this token as the password for connecting to your RDS instance

    For more details and examples, refer to the following resources. Usage is similar across DB engines.

    Keywords

    none

    Install

    npm i @aws-sdk/rds-signer

    DownloadsWeekly Downloads

    10,764

    Version

    3.181.0

    License

    Apache-2.0

    Unpacked Size

    35.5 kB

    Total Files

    24

    Last publish

    Collaborators

    • mattsb42-aws
    • kuhe
    • amzn-oss
    • aws-sdk-bot
    • trivikr-aws