Skip to content

Instantly share code, notes, and snippets.

View anujith-singh's full-sized avatar
🏠
working remotely

Anujith Singh anujith-singh

🏠
working remotely
View GitHub Profile
@anujith-singh
anujith-singh / delete_partial_files_S3.py
Last active November 9, 2017 05:14
Deletes or to correctly describe aborts partially uploaded files from Amazon S3
import os
import sys
import json
bucket_name = sys.argv[1]
limit = sys.argv[2]
# Usage Ex: python delete_partial_files_S3.py <my_bucket_name> <limit>
# output = os.popen("aws s3api list-multipart-uploads --bucket " + bucket_name).read()