amazon s3 - howto abort all incomplete multipart uploads for a bucket -
sometimes multipart uploads hang or don't complete reason. in case stuck orphaned parts tricky remove. can list them with:
aws s3api list-multipart-uploads --bucket $bucketname
i looking way abort them all.
assuming have awscli
setup , it'll output json can use jq
project needed keys with:
bucketname=<xxx> aws s3api list-multipart-uploads --bucket $bucketname \ | jq -r '.uploads[] | "--key \"\(.key)\" --upload-id \(.uploadid)"' \ | while read -r line; eval "aws s3api abort-multipart-upload --bucket $bucketname $line"; done
Comments
Post a Comment