Skip to content

Download selected files from an Amazon S3 bucket as a zip file

Notifications You must be signed in to change notification settings

anubhav756/s3-zip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3-zip

npm version Build Status Coverage Status

Download selected files from an Amazon S3 bucket as a zip file.

Install

npm install s3-zip

AWS Configuration

Refer to the AWS SDK for authenticating to AWS prior to using this plugin.

Usage

var s3Zip = require('s3-zip');
var fs = require('fs');

var region = 'bucket-region';
var bucket = 'name-of-s3-bucket';
var folder = 'name-of-bucket-folder/';
var file1 = 'Image A.png';
var file2 = 'Image B.png';
var file3 = 'Image C.png';
var file4 = 'Image D.png';

var output = fs.createWriteStream(__dirname + '/use-s3-zip.zip');

s3Zip
  .archive({ region: region, bucket: bucket}, folder, [file1, file2, file3, file4])
  .pipe(output);

Example of s3-zip in combination with AWS Lambda.

Testing

Tests are written in Node Tap, run them like this:

npm t

If you would like a more fancy report:

npm test -- --cov --coverage-report=lcov

About

Download selected files from an Amazon S3 bucket as a zip file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%