complete-multipart-upload
The aws s3api complete-multipart-upload
command is used to complete a multipart upload by assembling previously uploaded parts. This finalizes the upload and makes the file available in the S3 bucket.
aws s3api complete-multipart-upload --bucket BUCKET_NAME --key OBJECT_KEY --upload-id UPLOAD_ID --multipart-upload file://file.json
This command will complete the multipart upload process for the specified file.
Syntax
aws s3api complete-multipart-upload \
--key OBJECT_KEY \
--upload-id UPLOAD_ID \
--multipart-upload file://file.json
Options
--bucket
: Specifies the name of the Astran S3 bucket where the multipart upload was initiated.--key
: Identifies the object key under which the multipart upload was initiated.--upload-id
: The upload ID of the multipart upload that is being completed.--multipart-upload
: Specifies the file containing the parts information to complete the upload. This is typically a JSON file.
File format for parts
{
"Parts": [
{
"ETag": "etag1",
"PartNumber": 1
},
{
"ETag": "etag2",
"PartNumber": 2
},
{
"ETag": "etag3",
"PartNumber": 3
}
// ...
]
}
See also the original AWS documentation.