Skip to content

What happens when connection drop between ongoing CompleteMultipartUpload request?

0

Suppose I have uploaded a big file in multiple parts and after that called CompleteMultipartUpload through SDK. Now as mentioned in the documentation, it can take several minutes before I get complete response. Now what will happen if my connection gets dropped before I received full response? Does merge process continue? How can I later check that merge is still ongoing or completed?

asked 2 years ago836 views
1 Answer
2
Accepted Answer

Once the CompleteMultipartUpload request is received by Amazon S3, the server processes the request to merge the parts into a single object. This process continues even if the client connection drops.

The CompleteMultipartUpload request is idempotent. If you reissue the same request with the same UploadId and part information, it will complete the multipart upload without creating duplicate objects.

You can check if the multipart upload was completed by listing the parts or the object itself.

You can check if the multipart upload was completed by listing the parts or the object itself.

Use the HeadObject API to check if the object exists and retrieve its metadata.

aws s3api head-object --bucket your-bucket-name --key your-object-key

If the upload was not completed, you can list multipart uploads to see if it is still in progress.

aws s3api list-multipart-uploads --bucket your-bucket-name

List the parts of the upload to confirm the parts are uploaded and ready for completion.

aws s3api list-parts --bucket your-bucket-name --key your-object-key --upload-id your-upload-id

If you suspect the upload did not complete, you can safely retry the CompleteMultipartUpload request with the same UploadId and part information.

Summary:

  • Merge Process: The merge process initiated by CompleteMultipartUpload continues on the server side even if the client connection drops.
  • Verification: You can verify the status of the upload by checking the object, listing multipart uploads, or retrying the completion request.
  • Idempotency: Reissuing the CompleteMultipartUpload request with the same parameters is safe and will complete the process if it wasn't already completed.
EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.