New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/dsql-signer

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/dsql-signer

Dsql utility for generating a password token that can be used for IAM authentication to a Dsql Database.

3.758.0
latest
Source
npm
Version published
Weekly downloads
596
-43.98%
Maintainers
0
Weekly downloads
 
Created
Source

@aws-sdk/dsql-signer

NPM version NPM downloads

Description

This package provides utilities for interacting with Dsql.

Installation

npm install @aws-sdk/dsql-signer

Getting Started

Import

ES6 import

import { DsqlSigner } from "@aws-sdk/dsql-signer";

Or CommonJS import

const { DsqlSigner } = require("@aws-sdk/dsql-signer");

Generate Authentication Token for Dsql IAM Authentication

const signer = new DsqlSigner({
  /**
   * Required: The hostname of the database to connect to.
   */
  hostname: "foo0bar1baz2quux3quux4.dsql.us-east-1.on.aws";

  /**
   * 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;

  /**
   * Optional: The amount of time in seconds the generated token is valid
   */
  expiresIn?: 3600;

  /**
   * Optional: The AWS credentials to sign requests with. Uses the default credential provider chain if not specified.
   */
  credentials?: fromNodeCredentialProvider();
});

// Creates auth token.
const authToken = await signer.getDbConnectAuthToken();

// Creates admin auth token.
const adminAuthToken = await signer.getDbConnectAdminAuthToken();

// Use the token as the password for connecting to your Dsql instance.

FAQs

Package last updated on 27 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts