Skip to content

amitosdev/aws-secret-manager-fetcher

Repository files navigation

AWS Secret Manager Fetcher JavaScript Style Guide

A dead simple module to fetch secrets from AWS secret manager.

Install

> npm install --save aws-secret-manager-fetcher

Usage

const { fetchSecrets } = require('aws-secret-manager-fetcher')

async function init () {
  try {
    let secrets = await fetchSecrets('my-secret-name')
  } catch (e) {
    console.log('Error getting secrets ', e)
  }
}

API

fetchSecrets(secretName, [, awsParams])

  • secretName (String) - name of your secret.
  • awsParams (Object) - AWS SecretManager constructor params. If empty or missing a region property, the default will be: { region: 'us-east-1' }

About

Get secrets from AWS secret manager

Resources

License

Stars

Watchers

Forks

Packages

No packages published