Manage multipart uploads
Multipart uploads let you upload a single object as a set of independent parts. Each part is a contiguous portion of the object data. You can upload parts in parallel and in any order, and retry a failed part without restarting the whole upload. Once all parts are uploaded, Object Storage assembles them into a single object that you can access like any other object in the bucket.
Scaleway recommends using multipart uploads for objects larger than 50 MB. Multipart uploads are mandatory for objects larger than 5 GB, as a single PUT request cannot exceed this size.
Multipart uploads overview
A multipart upload is composed of 3 steps:
-
Initiate the upload. Object Storage returns a unique upload ID. You must include this identifier in every subsequent request related to the upload.
-
Upload the parts. Each part has a part number that defines its position in the final object. For each part uploaded, Object Storage returns an ETag that identifies the content of the part.
-
Complete the upload by sending the list of part numbers and their ETags. Object Storage assembles the parts in ascending part number order and creates the object.
Alternatively, you can abort the upload at any point. Aborting deletes all uploaded parts, and no object is created.
If you upload a part using a part number that already exists, the new part overwrites the previous one.
Object Storage stores the uploaded parts until you complete or abort the upload, and bills them as regular storage. Incomplete multipart uploads that you do not abort remain billed indefinitely. See Abort a multipart upload for more information.
Limits and part sizing
The following technical specifications apply to multipart uploads:
- Number of parts per upload
- 1 to 1,000
- Part size
- 5 MB to 5 GB (the last part can be smaller)
- Maximum object size
- 5 TB
As an upload cannot exceed 1,000 parts, the part size determines the maximum size of the object you can upload. To find the minimum part size for your object, divide the object size by 1,000.
Before you start
To complete the following actions, you must have:
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Installed and configured the AWS CLI
- An Object Storage bucket
Perform a multipart upload automatically with the AWS CLI
The high-level aws s3 commands perform multipart uploads automatically. When a file exceeds the multipart threshold, the AWS CLI splits it into parts, uploads them in parallel, and completes the upload.
-
Open your
~/.aws/configfile, and set themultipart_chunksizevalue to at least the size of your largest file divided by 1,000:Copymultipart_chunksize = 100MB # Allows uploads up to 100 GB -
Run the following command to upload your file. Replace
<BUCKET_NAME>with the name of your bucket.Copyaws s3 cp large-file.tar.gz s3://<BUCKET_NAME>/large-file.tar.gz
If the upload is interrupted, the uploaded parts remain stored and billed. List the in-progress multipart uploads of your bucket to find and abort them.
Perform a multipart upload manually
The low-level aws s3api commands give you full control over each step of a multipart upload. Use them to integrate multipart uploads in your own scripts, or to resume an upload part by part.
Unlike the aws s3 commands, the aws s3api commands do not split your file. You must split it into parts that respect the multipart upload limits before uploading them. You must create each part file, for example using the split command, or a custom script.
In the following procedure, replace <BUCKET_NAME> with the name of your bucket, and <UPLOAD_ID> with the upload ID returned when you initiate the upload.
Initiate a multipart upload
-
Run the following command to initiate the multipart upload:
Copyaws s3api create-multipart-upload --bucket <BUCKET_NAME> --key large-file.tar.gzAn output similar to the following appears:
Copy{ "Bucket": "<BUCKET_NAME>", "Key": "large-file.tar.gz", "UploadId": "Y2VhZDUxYjAtNjVjMC00NTIxLWEwNWUtNWM3NDAyOTQ4ZWYz" }Keep the
UploadIdvalue, as you need it to upload the parts, and to complete or abort the upload.
Upload a part
-
Run the following command to upload the first part:
Copyaws s3api upload-part --bucket <BUCKET_NAME> --key large-file.tar.gz --upload-id <UPLOAD_ID> --part-number 1 --body part-aaAn output similar to the following displays:
Copy{ "ETag": "\"4cb0d956600bab287520b442e83035a6\"" } -
Repeat the previous step for each part, incrementing the
--part-numbervalue and changing the--bodyvalue accordingly (--part-number 2 --body part-ab, and so on).
Complete a multipart upload
-
Run the following command to save the number and ETag of each uploaded part in a file named
parts.json:Copyaws s3api list-parts --bucket <BUCKET_NAME> --key large-file.tar.gz --upload-id <UPLOAD_ID> --query '{Parts: Parts[].{PartNumber: PartNumber, ETag: ETag}}' > parts.json -
Run the following command to complete the upload. Object Storage assembles the parts and creates the object.
Copyaws s3api complete-multipart-upload --bucket <BUCKET_NAME> --key large-file.tar.gz --upload-id <UPLOAD_ID> --multipart-upload file://parts.jsonAn output similar to the following appears:
Copy{ "Location": "https://<BUCKET_NAME>.s3.fr-par.scw.cloud/large-file.tar.gz", "Bucket": "<BUCKET_NAME>", "Key": "large-file.tar.gz", "ETag": "\"6eb393dac21d595a813f0c8bf4e9bc23-2\"" }
Monitor multipart uploads
List multipart uploads
An in-progress multipart upload is an upload that you initiated, but did not complete or abort yet. Run the following command to list the in-progress multipart uploads of a bucket. The AWS CLI returns them in alphabetical order of their object key.
aws s3api list-multipart-uploads --bucket <BUCKET_NAME>An output similar to the following displays:
{
"Uploads": [
{
"UploadId": "Y2VhZDUxYjAtNjVjMC00NTIxLWEwNWUtNWM3NDAyOTQ4ZWYz",
"Key": "large-file.tar.gz",
"Initiated": "2026-10-12T09:14:44.000Z",
"StorageClass": "STANDARD",
"Owner": {
"DisplayName": "a6a05c73-fa53-46a4-9ea1-e53b4f625527:a6a05c73-fa53-46a4-9ea1-e53b4f625527",
"ID": "a6a05c73-fa53-46a4-9ea1-e53b4f625527:a6a05c73-fa53-46a4-9ea1-e53b4f625527"
},
"Initiator": {
"ID": "a6a05c73-fa53-46a4-9ea1-e53b4f625527:a6a05c73-fa53-46a4-9ea1-e53b4f625527",
"DisplayName": "a6a05c73-fa53-46a4-9ea1-e53b4f625527:a6a05c73-fa53-46a4-9ea1-e53b4f625527"
}
}
]
}Use the --prefix option to only list the uploads of objects whose key starts with a given prefix:
aws s3api list-multipart-uploads --bucket <BUCKET_NAME> --prefix videos/List the parts of a multipart upload
Run the following command to list the parts already uploaded for a given multipart upload. Replace <OBJECT_KEY> and <UPLOAD_ID> with the values returned by the list-multipart-uploads command.
aws s3api list-parts --bucket <BUCKET_NAME> --key <OBJECT_KEY> --upload-id <UPLOAD_ID>An output similar to the following displays:
{
"Parts": [
{
"PartNumber": 1,
"LastModified": "2026-10-12T09:15:02.000Z",
"ETag": "\"4cb0d956600bab287520b442e83035a6\"",
"Size": 104857600
},
{
"PartNumber": 2,
"LastModified": "2026-10-12T09:15:03.000Z",
"ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
"Size": 104857600
}
],
"StorageClass": "STANDARD"
}Use this output to identify missing parts and upload them before completing the upload.
Abort a multipart upload
Aborting a multipart upload deletes all its uploaded parts, and stops the billing of these parts. Abort the multipart uploads that you do not intend to complete.
-
Run the following command to abort the upload. Replace
<OBJECT_KEY>and<UPLOAD_ID>with the values returned by thelist-multipart-uploadscommand.Copyaws s3api abort-multipart-upload --bucket <BUCKET_NAME> --key <OBJECT_KEY> --upload-id <UPLOAD_ID> -
Run the following command to make sure the upload no longer appears in the list of in-progress uploads:
Copyaws s3api list-multipart-uploads --bucket <BUCKET_NAME>If the bucket has no other in-progress uploads, an output similar to the following displays:
Copy{ "Uploads": [] }
You can also view and abort incomplete multipart uploads from the Scaleway console.
To abort incomplete multipart uploads automatically after a given number of days, create a lifecycle rule for incomplete multipart uploads.