ksastan / s3_cleaner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

s3_cleaner

Overview

Current script provide possibillity to remove files from S3 buckets. Files can be deleted by 2 conditions - part of file name and file age.

Prerequisite

Dependencies should be installed.

pip install requiremets.txt

Usage

List files

s3_clean.py list-objects --url https://<s3Storage> --id <s3Id> --key <s3Key> \
    --region <region> --bucket <bucketName>

Delete files

s3_clean.py delete-objects --url https://<s3Storage> --id <s3Id> --key <s3Key> \
    --region <region> --bucket <bucketName> --namecontain <partOfFileName> --age <days>

About


Languages

Language:Python 100.0%