aws-sso-credential-loader
TypeScript icon, indicating that this package has built-in type declarations

0.1.10 • Public • Published

aws-sso-credential-loader

about

  • A helper module to load AWS SSO credential for NodeJS cli applications.

  • User can select local aws profiles via cli. This module sets correspondent credentials of selected profile to NodeJS environment variables. aws-sdk modules in same process can utilize those values/credentials to access specified aws environment.

prerequisite

  • aws-cli v2

  • .aws/config file under home folder which generated with aws configure sso command

how to use

import { setAwsSsoCredential } from "aws-sso-credential-loader";

(async() => {
  // run this function before calling any aws sdk functions
  await setAwsSsoCredential();
  // after the function above set credentials into process.env 
  // aws sdk functions can reference credentials which set in process.env

})

/aws-sso-credential-loader/

    Package Sidebar

    Install

    npm i aws-sso-credential-loader

    Weekly Downloads

    0

    Version

    0.1.10

    License

    ISC

    Unpacked Size

    8.95 kB

    Total Files

    5

    Last publish

    Collaborators

    • ryotaimc