wattry / vault-aws-iam

Authenticates with Hashicorp vault using AWS IAM roles.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vault-aws-iam

Authenticates and reads secrets with HashiCorp vault using AWS IAM roles.

Examples

const vault = new VaultAws({
  server: 'example.vault.com',
  port: '8200',
  AWS: {
    region: 'us-east-1'
  }
});

// Initialize the package with this
async function setup() {
  await vault.login('iam-role');
}

// Fetch the secret you require and do what you need with it.
function getSecret(secretName) {
  const { data } = await vault.read('secret/data/name');

  return data[secretName];
}

About

Authenticates with Hashicorp vault using AWS IAM roles.

License:MIT License


Languages

Language:TypeScript 100.0%