Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

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


Version published
Weekly downloads
30
decreased by-3.23%
Maintainers
0
Weekly downloads
 
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

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc