@squareball/aws-vault-credentials
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@squareball/aws-vault-credentials

Load current AWS credentials from aws-vault.

Usage

import { S3Client } from '@aws-sdk/client-s3';
import { AwsVaultCredentials } from '@squareball/aws-vault-credentials';

const s3 = new S3Client({
  crentials: AwsVaultCredentails.provide({
    awsVaultPath: 'aws-vault', // path to aws-vault
    durationSeconds: undefined, // length in seconds for the session
    guiPrompt: false, // true to show a platform-specific GUI MFA prompt
    mfaToken: undefined, // manually pass a specific MFA token
    noSession: false, // true to use the long-term credentials
    profileName: 'your-profile', // the name of the aws-vault profile to use
    prompt: undefined, // a named prompt option (see aws-vault options)
  }),
});

guiPrompt option

This will choose osascript on darwin and wincredui on win32. It is ignored on other platforms.

Readme

Keywords

none

Package Sidebar

Install

npm i @squareball/aws-vault-credentials

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

23.3 kB

Total Files

23

Last publish

Collaborators

  • mgroberts
  • gordonmleigh