List every incomplete S3 multipart upload
📑 On this page
Part 78 of AWS from Zero. This lesson keeps the scope to one S3 behavior you can verify from the terminal.
What we are learning
Incomplete upload inventory is part of S3 cost hygiene because uploaded parts are billed even though no normal object exists.
Before you run it
aws sts get-caller-identity
REGION="ap-south-1"
BUCKET="replace-with-your-private-demo-bucket"Use a private general purpose bucket that you own. Replace every placeholder before running a write or delete command.
Cost note: Incomplete parts continue to consume billable storage.
The command
aws s3api list-multipart-uploads \
--bucket "$BUCKET"A successful configuration command may return no output. Treat inspection as a separate required step.
Inspect the result
aws s3api list-multipart-uploads \
--bucket "$BUCKET" \
--query "Uploads[].{Key:Key,UploadId:UploadId,Started:Initiated,Owner:Initiator.DisplayName}" \
--output tableRead the returned fields rather than assuming the write succeeded exactly as intended.
One tiny variation
aws s3api list-multipart-uploads \
--bucket "$BUCKET" \
--prefix "incoming/" \
--query "Uploads[].{Key:Key,Started:Initiated}" \
--output tableNarrow the audit to an application prefix before cleanup.
Common mistake
Do not abort uploads solely because they are present. Confirm age and application ownership so you do not interrupt an active transfer.
Cleanup
# Abort one confirmed stale upload:
aws s3api abort-multipart-upload \
--bucket "$BUCKET" \
--key "$STALE_KEY" \
--upload-id "$STALE_UPLOAD_ID"Use exact key and upload ID pairs, then list again to confirm removal.
Next, we will learn Restore an archived S3 object temporarily.