Socket
Book a DemoInstallSign in
Socket

knox-ec2-role

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knox-ec2-role

Create Knox Client Using EC2 Instance Role Metadata

1.0.9
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

Build Status Downloads Downloads npm version dependencies dev dependencies License

knox-ec2-role

Create a Knox client using ec2 instance role metadata. Great for removing credentials from github and/or chef databags

See this guide which explains how to set up and use EC2 instance roles for your app.

Installation

npm install --save knox-ec2-role

Usage

var knoxec2 = require('knox-ec2-role')
var knox = require('knox')
knoxec2.authenticate(knox, {bucket: 'my-bucket'})
  .then(function(client){
    var req = client.put('/test/obj.json', {
      'Content-Type': 'application/json'
    })
    req.on('response', function(res){
      if (200 == res.statusCode) {
        console.log('saved to %s', req.url);
      }
    }
    req.end(JSON.stringify({foo: 'bar'}))
  })
  .catch(function(e){
    console.log('error fetching metadata:' + e)
  });

Changes

v1.0

  • authenticate takes knox object so caller can install any fork. e.g. knoxec2.authenticate(knox, {bucket: 'my-bucket'})

Credits

Tony Metzidis

Keywords

aws

FAQs

Package last updated on 09 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.