Created
May 20, 2020 11:41
-
-
Save kshailen/f4bba2b16a359483b905c59368f62c75 to your computer and use it in GitHub Desktop.
This scripts provides a list of multiparts in it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
def get_multipart_upload(bucket): | |
client = boto3.client('s3') | |
response_multipart = client.list_multipart_uploads(Bucket=bucket) | |
# print(response_multipart) | |
multiparts = [] | |
if "Uploads" in response_multipart.keys(): | |
multiparts = response_multipart["Uploads"] | |
return multiparts | |
def main(): | |
print(get_multipart_upload('complianx-xxdbox')) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment