1.0.5 • Published 7 years ago

replay-aws-s3 v1.0.5

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

A simple wrapper for Amazon S3

Amazon Web Services (AWS) - Amazon S3 (Amazon Simple Storage Service) wrapper for Replay project.
Using the S3 npm package for high level client of the aws-sdk module.

Process environment variables

NameDescriptionDefault
AWS_ACCESS_KEY_IDAWS S3 access key idrequired
AWS_SECRET_ACCESS_KEYAWS S3 secret access keyrequired
AWS_ENDPOINTAWS S3 endpointAmazon default: something like http://s3-{region}.amazonaws.com
AWS_REGIONAWS S3 regioneu-west-1
MAX_SOCKETSSocket pool size in the http & https global agents. (This will improve bandwidth when using uploadDir and downloadDir functions.)20

Installation

npm install replay-aws-s3 --save

API Usage

var s3 = require('replay-aws-s3');

// General functions:
s3.getAWS();

s3.getClient();

// Files functions:
s3.uploadFile(filePath, bucket, key);
s3.downloadFile(filePath, bucket, key);
s3.downloadBuffer(bucket, key);

// Objects functions:
s3.listObjects(bucket, prefix);
s3.deleteObjects(bucket, objects);

// Directories functions:
s3.uploadDir(dirPath, bucket, prefix);
s3.downloadDir(dirPath, bucket, prefix);
s3.deleteDir(bucket, prefix);

// Buckets functions:
s3.listBuckets();
s3.createBucket(bucket);
s3.deleteBucket(bucket);

// TODO...

Extra Info:

See also:

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago