1 unstable release

0.1.0 Nov 25, 2022

#11 in #removal

GPL-3.0-or-later

30KB
148 lines

Latest Version License

S3 Object Remover

Bulk remove object from S3. Optionally create backup as a tar archive.

Features:

  • Takes a list of keys to remove form a bucket on standard input.
  • Optionally generates tar archive backup to standard output.
  • Bulk deletes objects using AWS bulk delete API.

Example usage

Note: You need to set up AWS credentials and default region using ~/.aws/credentials and ~/.aws/config files or use environment variables (AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) or use instance profile (on EC2). Consult AWS documentation for details. Additionally options --aws-region and --aws-region-endpoint can be specified on the command line.

cat object.list | s3rm --verbose --backup mybucket > backup.tar

Installation

With Rust already installed on you system.

cargo install s3rm

Dependencies

~22–34MB
~528K SLoC