s3
Handles file syncing to AWS S3 Bucket.
Installation
npm install properjs-s3 --save-dev
Usage
These are the arguments required by the S3 module to perform a sync. You should keep them in a safe place where only your app can access them.
- key: "The AWS access key id ( IAM )."
- secret: "The AWS secret access key ( IAM )."
- region: "The AWS region, like us-west-2."
- bucket: "The AWS S3 bucket name to sync with."
- prefix: "The AWS S3 folder name to sync files to."
- directory: "The local directory to sync to S3."
const s3 = require( "properjs-s3" );
s3.sync( key, secret, region, bucket, prefix ).then(() => {
// Handle successful syncing
}).catch(() => {
// Handle erroneous syncing
});