A client for working with objects in AWS S3 buckets.
npm install --save aws-s3-client
npm install -g aws-s3-client
You must configure the proper credentials on your AWS S3. See the AWS documentation Configuration and Credential Files for instructions on how to setup credentials.
const awsS3Client = require('aws-s3-client.js');
var s3Client = awsS3Client();
s3Client.ListBuckets();
awsS3client --command <command> --bucket <bucket> [options]
- buckets - List the buckets contained your S3 profile.
- download - Download the object specified by the path.
- Required Options:
--path <path to object>
- Required Options:
- list - List the objects at the specified path.
- Required Options:
--path <path to object>
- Required Options:
- search - Search objects matching the provided path.
- Required Options:
--path <path to object>
- Required Options:
- size - Calculate the total size of objects matching the provided path.
- Required Options:
--path <path to object>
- Required Options:
List the buckets contained in S3:
awsS3client --command buckets
List the contents of "folder1" in "mys3Bucket":
awsS3client --bucket myS3Bucket --command list --path "folder1/"