Giter Site home page Giter Site logo

node-aws-secrets's Introduction

AWS Secret Manager for Node

Allows download and upload of secrets from AWS S3 and KMS

npm version Build Status Coverage Status

Usage

Upload secret to S3 via KMS encryption

const SecretsManager = require("aws-secrets-manager");
const secretsManager = new SecretsManager();

var options = {
    secret: 'my-plaintext-secret',
    s3Location: 's3://mybucket/mysecret',
    kmsKeyId: 'my-kms-key-id/arn/alias'
};
secretsManager.set(options)
    .then(function (ciphertextBuffer) {
        // Upload and encryption was successful
        // ciphertextBuffer as Buffer object
        console.log(ciphertextBuffer.toString());
    }).catch(function (err) {
        // If things went wrong
        // err is Error object
        console.error(err);
    });

Access encrypted secret stored on S3

const SecretsManager = require("aws-secrets-manager");
const secretsManager = new SecretsManager();

secretsManager.get("s3://mybucket/myfolder/mysecret")
    .then(function (ciphertext) {
        // Download and decryption was successful
        // ciphertext as Buffer object
        console.log(ciphertext.toString());
    })
    .catch(function (err) {
        // If things went wrong
        // err is Error object
        console.error(err);
    });

Contact

If you have a question/idea/suggestion, I'd like to encourage you to raise an issue with relevant label. I will try to get back to you as soon as I can.

If you are able, I highly encourage people to communicate their ideas over a pull request with code as it is the best and most efficient way to effectively knowledge transfer.

node-aws-secrets's People

Contributors

manthanhd avatar

Watchers

 avatar  avatar

Forkers

neeta-kib

node-aws-secrets's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.