s3streamer

2.0.1 • Public • Published

s3streamer

Stream objects from S3.

build status

Installation

This module is installed via npm:

$ npm install s3streamer

Example Usage

var s3streamer = require('s3streamer')(s3credentials);
 
var objectKeys = s3streamer.objectKeys({Bucket: process.env.BUCKET, Prefix: 'myprefix'});
// {key: 'blah', bucket: 'thebucketyougave'}, ...
 
var getObjects = objectKeys.pipe(s3streamerer.getObject());
// {key: 'blah', body: 'contents...'}, ...
 

s3credentials are passed in to: new AWS:S3(s3credentials), cf Amazon doco here: (http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html)

Tests

To run the tests you will need some valid S3 credentials and a corresponding bucket. Ensure the bucket has at least one object with a key prefixed by exists. Run like so:

S3_REGION='us-east-1' S3_ACCESS_KEY_ID='mykeyid' S3_SECRET_ACCESS_KEY='mysecretaccesskey' BUCKET='mybucket' npm test

Readme

Keywords

Package Sidebar

Install

npm i s3streamer

Weekly Downloads

0

Version

2.0.1

License

BSD-3-Clause

Last publish

Collaborators

  • noblesamurai
  • eugeneware
  • jacob-samurai
  • timlesallen