AWS S3 Count
This package is to calculate the size of the existing folder AWS S3.
Install
With yarn
yarn add aws-s3-count
or npm
npm install aws-s3-count
Example Usage
const s3Count = ; // Declare your S3 Conifgconst config = accessKeyId: 'myAccessKeyId' secretAccessKey: 'mySecretAccessKey' endpoint: 'https://example-url.com' bucket: 'my-bucket'; // Using promise; // Using async / awaitconst count = async { const size = await ; console; return size;};
Parameters
There are 3 paramaters you must passing.
s3Count(first, second, third)
Parameters:
first (String)
: Folder inside bucket will be count. Example:publics/
,publics/sub_folder/
.second (boolean)
: By default settrue
. If true. will calculating all sub folder that you declare path folder inside first parameter. Iffalse
, will calculating current folder.third (object)
: Config AWS S3, you can see like example above.