A tiny tool for AWS S3. This is a tool to delete the target files (1,000 or more) from the bucket that stores a large number of files.
- node command
- npm command
add or confirm your credential.
$ cat << EOF >> ~/.aws/credentials
[example-account]
aws_access_key_id = AKI00000000000000000
aws_secret_access_key = 0000000000000000000000000000000000000000
EOF$ npm install$ node index.js \
--profile "example-account" \
--bucket "bucket-name" \
--prefix "path/to/delete/prefix"- list.txt
path/to/delete/1.txt
path/to/delete/2.txt
path/to/delete/3.txt
dir/to/delete
$ cat list.txt \
| xargs -n 1 \
node index.js \
--profile "example-account" \
--bucket "bucket-name" \
--prefix $ node index.js \
--profile "example-account" \
--bucket "bucket-name" \
--versions \
--prefix "path/to/delete/prefix"