How to Try S3 Multipart Upload with AWS Emulator
Running AWS Emulator locally lets you go through the S3 multipart upload process (sending a large file in several parts and then combining them into one object) without an AWS account. This is how I tested splitting a large file, such as a video or backup, into parts without sending anything to the real S3. I show the step-by-step method with aws s3api, how aws s3 cp splits files automatically, the errors that are easy to run into, and the size limits specific to the emulator. The commands and output are copied from the test environment.
The test environment was Ubuntu 24.04 (x86_64), AWS Emulator 1.0.385 (released November 14, 2026), and AWS CLI 2.40.3. I did not use an AWS account or credentials. I did not verify how real S3 behaves (pricing, transfer speed, lifecycle rules actually deleting uploads, or the result of aborting an upload that has already been aborted). Where I describe real S3, the information comes from the official documentation.
- 1. Start the emulator and point the AWS CLI at it
- 2. Multipart upload proceeds in three stages
- 3. Start: create-multipart-upload
- 4. Upload parts: upload-part
- 5. Complete: complete-multipart-upload
- 6. Check the created object
- 7. When a part other than the last is smaller than 5 MiB
- 8. Stop partway: abort-multipart-upload
- 9. When aws s3 cp splits files automatically
- 10. Size limits the emulator enforces
Start the emulator and point the AWS CLI at it
AWS Emulator is an emulator that accepts AWS API calls on your own machine. The installation is covered in a separate article, "How to Install AWS Emulator on Ubuntu and Get Started." Here I installed the Debian package from the Linux instructions, verifying the gpg signature first, and started it with -t off (the option that disables telemetry).
aws-emulator -t off
In a separate terminal, I set the environment variables from the official documentation.
export AWS_ENDPOINT_URL=https://127.0.0.1:9297
export AWS_SHARED_CREDENTIALS_FILE=~/.aws/emulator/9297/emulator_credentials
export AWS_CONFIG_FILE=~/.aws/emulator/9297/config
export AWS_CA_BUNDLE=~/.aws/emulator/9297/ca.pem
export AWS_EC2_METADATA_DISABLED=true
export AWS_DISABLE_HOST_PREFIX_INJECTION=true
export AWS_REGION=us-east-1
export AWS_DEFAULT_REGION=us-east-1
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_PROFILE
The official documentation warns that if you run a command in a shell where AWS_ENDPOINT_URL is not set, the command will use whatever credentials it finds and send the request to real AWS. On a machine that has real credentials, run these commands only in a shell where all of the environment variables above are set.
I created a bucket and split a 12 MiB (12,582,912 bytes) file into 5 MiB pieces with split. Only part-02 ends up at 2 MiB.
$ aws s3 mb s3://example-bucket
make_bucket: example-bucket
$ head -c 12582912 /dev/urandom > big.bin && split -b 5242880 -d big.bin part- && ls -l big.bin part-*
-rw-r--r-- 1 user user 12582912 Nov 15 02:13 big.bin
-rw-r--r-- 1 user user 5242880 Nov 15 02:13 part-00
-rw-r--r-- 1 user user 5242880 Nov 15 02:13 part-01
-rw-r--r-- 1 user user 2097152 Nov 15 02:13 part-02
In the ls -l output, the owner column has been replaced with user.
Multipart upload proceeds in three stages
According to the multipart upload overview, the process has three stages: start, upload parts, and complete. The upload ID returned when you start must be passed to every later operation. The ETag returned for each part must be recorded together with its part number, and you pass the list of these to the complete step.

The S3 multipart upload limits page states that part sizes range from 5 MiB to 5 GiB, with no minimum for the last part. Part numbers run from 1 to 10,000. The same page recommends considering multipart upload instead of a single PUT once an object reaches around 100 MB.
Start: create-multipart-upload
Start with aws s3api create-multipart-upload. Specify the Content-Type and metadata here if you need them. The UploadId in the response is the ID for this upload.
$ aws s3api create-multipart-upload --bucket example-bucket --key big.bin --content-type application/octet-stream --metadata purpose=demo
{
"ServerSideEncryption": "AES256",
"Bucket": "example-bucket",
"Key": "big.bin",
"UploadId": "L5aAX8JrqYJ70UE1apUcaiKKLJpHz9-aDkoKMarB3qU"
}
$ UPLOAD_ID=L5aAX8JrqYJ70UE1apUcaiKKLJpHz9-aDkoKMarB3qU
The last line stores the returned value in a variable.
A started upload appears in aws s3api list-multipart-uploads. At this point no object exists yet, so aws s3 ls shows nothing (the Owner ID and account ID have been replaced).
$ aws s3api list-multipart-uploads --bucket example-bucket
{
"Uploads": [
{
"UploadId": "L5aAX8JrqYJ70UE1apUcaiKKLJpHz9-aDkoKMarB3qU",
"Key": "big.bin",
"Initiated": "2026-11-15T02:13:39+00:00",
"StorageClass": "STANDARD",
"Owner": {
"ID": "<オーナーID>"
},
"Initiator": {
"ID": "arn:aws:iam::<アカウントID>:user/emulator",
"DisplayName": "emulator"
}
}
],
"RequestCharged": null,
"Prefix": null
}
$ aws s3 ls s3://example-bucket/
Upload parts: upload-part
Send each part with aws s3api upload-part, giving the part number in --part-number and the file in --body. As the official documentation says, the parts can be sent in any order. Here I sent part 3 first, and deliberately sent the second file (part-01) as part 1.
$ aws s3api upload-part --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --part-number 3 --body part-02
{
"ServerSideEncryption": "AES256",
"ETag": "\"b14c72ffcf40df0a287bd0dc170a6aff\"",
"ChecksumCRC64NVME": "Ja5CbIGSMiI="
}
$ aws s3api upload-part --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --part-number 1 --body part-01
{
"ServerSideEncryption": "AES256",
"ETag": "\"2c9e09e3a995c56e870db8e4a5c8d849\"",
"ChecksumCRC64NVME": "3o/N7XWGolI="
}
If you send a wrong part, you can replace it by sending again with the same part number. The multipart upload overview also states that sending with the same number overwrites the earlier part. I resent part 1 with the correct file, sent part 2, and then checked which parts the service had received with aws s3api list-parts.
$ aws s3api upload-part --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --part-number 1 --body part-00
{
"ServerSideEncryption": "AES256",
"ETag": "\"24e71e3a91d42729991e2099c7395617\"",
"ChecksumCRC64NVME": "H3oxJAuVADA="
}
$ aws s3api upload-part --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --part-number 2 --body part-01
(応答は省略。ETag は "2c9e09e3a995c56e870db8e4a5c8d849")
$ aws s3api list-parts --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --query "Parts[].{PartNumber: PartNumber, Size: Size, ETag: ETag}"
[
{
"PartNumber": 1,
"Size": 5242880,
"ETag": "\"24e71e3a91d42729991e2099c7395617\""
},
{
"PartNumber": 2,
"Size": 5242880,
"ETag": "\"2c9e09e3a995c56e870db8e4a5c8d849\""
},
{
"PartNumber": 3,
"Size": 2097152,
"ETag": "\"b14c72ffcf40df0a287bd0dc170a6aff\""
}
]
$ md5sum part-*
24e71e3a91d42729991e2099c7395617 part-00
2c9e09e3a995c56e870db8e4a5c8d849 part-01
b14c72ffcf40df0a287bd0dc170a6aff part-02
Only the ETag from the resent part 1 remained, and the three parts were listed in part-number order. For every part, the ETag matched the MD5 of the file I sent.
The --query at the end narrows the output to the part number, size, and ETag so it is easier to read. The multipart upload overview says to use this list only for verification, and to build the list you pass to the complete step from the part numbers and ETags you recorded when you sent each part.
Specifying part number 10001 made the emulator reject the request with InvalidArgument.
$ aws s3api upload-part --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --part-number 10001 --body part-02
aws: [ERROR]: An error occurred (InvalidArgument) when calling the UploadPart operation: Part number must be an integer between 1 and 10000, inclusive
Complete: complete-multipart-upload
Pass the list of part numbers and ETags as JSON to --multipart-upload in aws s3api complete-multipart-upload. The ETags I had recorded matched the MD5 of each file, so I created the following parts.json from the md5sum values. The ETag values include the surrounding " characters.
{
"Parts": [
{
"PartNumber": 1,
"ETag": "\"24e71e3a91d42729991e2099c7395617\""
},
{
"PartNumber": 2,
"ETag": "\"2c9e09e3a995c56e870db8e4a5c8d849\""
},
{
"PartNumber": 3,
"ETag": "\"b14c72ffcf40df0a287bd0dc170a6aff\""
}
]
}
$ aws s3api complete-multipart-upload --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --multipart-upload file://parts.json
{
"ServerSideEncryption": "AES256",
"Location": "https://127.0.0.1:9297/example-bucket/big.bin",
"Bucket": "example-bucket",
"Key": "big.bin",
"ETag": "\"a8dac85f3f2a079da5dcb64b5e7bb2ad-3\"",
"ChecksumCRC64NVME": "9Nfxa1CG5CY=",
"ChecksumType": "FULL_OBJECT"
}
After completion, the upload disappeared from list-multipart-uploads, and running list-parts with the same upload ID returned NoSuchUpload. The multipart upload overview also says that parts do not remain after the upload is completed.
$ aws s3api list-multipart-uploads --bucket example-bucket
{
"RequestCharged": null,
"Prefix": null
}
$ aws s3api list-parts --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID"
aws: [ERROR]: An error occurred (NoSuchUpload) when calling the ListParts operation: The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.
When the part order or ETag is wrong
Before creating parts.json, I passed deliberately wrong lists to check the errors. Listing the part numbers as 2, then 1, produced InvalidPartOrder. Writing an ETag for a part that was never sent produced InvalidPart. Both exited with status 254. This matches the descriptions of these two errors in the CompleteMultipartUpload API reference.
$ aws s3api complete-multipart-upload --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --multipart-upload '{"Parts":[{"PartNumber":2,"ETag":"\"2c9e09e3a995c56e870db8e4a5c8d849\""},{"PartNumber":1,"ETag":"\"24e71e3a91d42729991e2099c7395617\""}]}'
aws: [ERROR]: An error occurred (InvalidPartOrder) when calling the CompleteMultipartUpload operation: The list of parts was not in ascending order. Parts must be ordered by part number.
$ aws s3api complete-multipart-upload --bucket example-bucket --key big.bin --upload-id "$UPLOAD_ID" --multipart-upload '{"Parts":[{"PartNumber":1,"ETag":"\"00000000000000000000000000000000\""}]}'
aws: [ERROR]: An error occurred (InvalidPart) when calling the CompleteMultipartUpload operation: One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part's entity tag.
In the test, I inserted the ETag values from the md5sum output directly into the commands. The examples above show those values written out. The same applies to the complete commands in later sections, where ETags are written into the command.
Check the created object
head-object showed a single 12,582,912-byte object, with the Content-Type and metadata I set at the start.
$ aws s3api head-object --bucket example-bucket --key big.bin
{
"AcceptRanges": "bytes",
"LastModified": "2026-11-15T02:13:50+00:00",
"ContentLength": 12582912,
"ETag": "\"a8dac85f3f2a079da5dcb64b5e7bb2ad-3\"",
"ContentType": "application/octet-stream",
"ServerSideEncryption": "AES256",
"Metadata": {
"purpose": "demo"
}
}
The ETag has a -3 suffix and is not the MD5 of the whole file (1c621139deecbecfe25d40bd96bbb6cd). The CompleteMultipartUpload API reference says the ETag is not necessarily an MD5. The emulator's value matched the MD5 of the concatenated binary MD5 digests of the three parts, followed by - and the number of parts.
$ md5sum big.bin
1c621139deecbecfe25d40bd96bbb6cd big.bin
$ python3 -c "import hashlib,sys; d=b\"\".join(hashlib.md5(open(f,\"rb\").read()).digest() for f in sys.argv[1:]); print(hashlib.md5(d).hexdigest() + \"-\" + str(len(sys.argv)-1))" part-00 part-01 part-02
a8dac85f3f2a079da5dcb64b5e7bb2ad-3
To check that the content was not corrupted, I downloaded the object and compared SHA-256 hashes. They matched.
$ aws s3 cp --no-progress s3://example-bucket/big.bin dl.bin && sha256sum big.bin dl.bin
download: s3://example-bucket/big.bin to ./dl.bin
a7a43c04b9a8e0c0f1b53d842fa99801431eaaa8f0b5f824dee4ac545388e366 big.bin
a7a43c04b9a8e0c0f1b53d842fa99801431eaaa8f0b5f824dee4ac545388e366 dl.bin
Adding --part-number to get-object retrieved only the byte range for that part. For part 2, ContentRange was 5 MiB starting at byte 5,242,880, and PartsCount was 3. The retrieved content was identical to part-01.
$ aws s3api get-object --bucket example-bucket --key big.bin --part-number 2 p2.bin --query "{ContentLength: ContentLength, ContentRange: ContentRange, PartsCount: PartsCount}" && cmp p2.bin part-01 && echo same
{
"ContentLength": 5242880,
"ContentRange": "bytes 5242880-10485759/12582912",
"PartsCount": 3
}
same
When a part other than the last is smaller than 5 MiB
From here on, I started a separate upload for small.bin and stored its UploadId in the variable SMALL_ID. (The LEFT_ID, CAP_ID, and CAP2_ID variables in later sections work the same way.) When I sent two 1 MiB parts and tried to complete the upload, the emulator returned EntityTooSmall. The CompleteMultipartUpload API reference states that every part except the last must be at least 5 MB. This error came at the complete step, not when the parts were sent.
$ aws s3api complete-multipart-upload --bucket example-bucket --key small.bin --upload-id "$SMALL_ID" --multipart-upload '{"Parts":[{"PartNumber":1,"ETag":"\"5d614baf66b60d417151fac8d5f51050\""},{"PartNumber":2,"ETag":"\"d7e9f1b0759f4250dc3e4d7d37ff1ae2\""}]}'
aws: [ERROR]: An error occurred (EntityTooSmall) when calling the CompleteMultipartUpload operation: Your proposed upload is smaller than the minimum allowed size
When I completed the same upload with only part 2 in the list, it succeeded, because a single part is then the last part. The resulting object was 1 MiB, and its content matched small-2, the file I had sent as part 2. Part 1, which I left out of the list, is not included in the object. The API reference says the parts in the list are concatenated, but it also says the list should contain all the parts you uploaded.
$ aws s3api complete-multipart-upload --bucket example-bucket --key small.bin --upload-id "$SMALL_ID" --multipart-upload '{"Parts":[{"PartNumber":2,"ETag":"\"d7e9f1b0759f4250dc3e4d7d37ff1ae2\""}]}'
(応答の ETag は "e82f36eb3e04e1435738146354675ec3-1")
$ aws s3api head-object --bucket example-bucket --key small.bin --query "{ContentLength: ContentLength, ETag: ETag}"
{
"ContentLength": 1048576,
"ETag": "\"e82f36eb3e04e1435738146354675ec3-1\""
}
$ aws s3 cp s3://example-bucket/small.bin - | cmp - small-2 && echo same-as-small-2
same-as-small-2
Stop partway: abort-multipart-upload
An upload that is started but never completed does not appear in aws s3 ls, but it remains on the service. I started an upload for left.bin and sent one part. It appeared only in list-multipart-uploads.
$ aws s3 ls s3://example-bucket/
2026-11-15 02:13:50 12582912 big.bin
2026-11-15 02:13:58 1048576 small.bin
$ aws s3api list-multipart-uploads --bucket example-bucket --query "Uploads[].{Key: Key, UploadId: UploadId}"
[
{
"Key": "left.bin",
"UploadId": "VSvAb2IraXidCRkDwZx4V6pD2LyPLzauRqD5ZP5szuM"
}
]
To stop an upload, use aws s3api abort-multipart-upload. It printed nothing and exited with status 0. The upload then disappeared from the list, and sending a part with the same upload ID returned NoSuchUpload.
$ aws s3api abort-multipart-upload --bucket example-bucket --key left.bin --upload-id "$LEFT_ID"
$ aws s3api list-multipart-uploads --bucket example-bucket --query "Uploads[].{Key: Key, UploadId: UploadId}"
null
$ aws s3api upload-part --bucket example-bucket --key left.bin --upload-id "$LEFT_ID" --part-number 2 --body part-01
aws: [ERROR]: An error occurred (NoSuchUpload) when calling the UploadPart operation: The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.
Running abort-multipart-upload again with the same upload ID did not produce an error in the emulator, and it exited with status 0. The AbortMultipartUpload API reference lists NoSuchUpload as an error that can be returned. I did not verify the behavior on real S3.
On real S3, parts from an upload that has been neither completed nor aborted continue to incur storage charges. The multipart upload overview states that storage charges for parts continue until the upload is completed or aborted, and recommends using the AbortIncompleteMultipartUpload lifecycle rule to delete uploads that remain incomplete after a set number of days. In the emulator, I was able to configure a rule that deletes uploads after 7 days, following the official example, and read it back. I only checked that the rule could be set and read back.
$ aws s3api put-bucket-lifecycle-configuration --bucket example-bucket --lifecycle-configuration '{"Rules":[{"ID":"abort-incomplete-mpu","Status":"Enabled","Filter":{"Prefix":""},"AbortIncompleteMultipartUpload":{"DaysAfterInitiation":7}}]}'
{
"TransitionDefaultMinimumObjectSize": "all_storage_classes_128K"
}
$ aws s3api get-bucket-lifecycle-configuration --bucket example-bucket
{
"TransitionDefaultMinimumObjectSize": "all_storage_classes_128K",
"Rules": [
{
"ID": "abort-incomplete-mpu",
"Filter": {
"Prefix": ""
},
"Status": "Enabled",
"AbortIncompleteMultipartUpload": {
"DaysAfterInitiation": 7
}
}
]
}
When aws s3 cp splits files automatically
Normally you do not write the steps above by hand. aws s3 cp turns large files into multipart uploads automatically. A separate article, "How to Store and Retrieve Files with S3 in AWS Emulator," also covers a 20 MiB file being split into three parts. Here I tested the file size at which the split happens and how to change the part size. According to the AWS CLI S3 configuration page, files at or above multipart_threshold (default 8 MB) are sent in parts, and each part is multipart_chunksize in size (default 8 MB).
I stored 7 MiB, 9 MiB, and 20 MiB files with aws s3 cp and checked their ETags. The 7 MiB file had the plain MD5 of the file as its ETag, the 9 MiB file had -2, and the 20 MiB file had -3.
$ for f in f7m f9m f20m; do echo "$f $(aws s3api head-object --bucket cp-bucket --key $f.bin --query ETag --output text)"; done; md5sum f7m.bin
f7m "bba1e5500a7a749e826777b3003e1171"
f9m "0baedbd619d66d212fa4db8b14ecd49c-2"
f20m "702d54b3d3fc61cac83703a0ebb05eeb-3"
bba1e5500a7a749e826777b3003e1171 f7m.bin
I uploaded the 20 MiB file with --debug and counted the log lines for part uploads. There were three.
$ aws s3 cp --debug --no-progress f20m.bin s3://cp-bucket/debug.bin 2>&1 | grep -c "UploadPart for Multi-part Upload"
3
To change the part size, use aws configure set default.s3.multipart_chunksize. However, running it as-is rewrites the configuration file the emulator generates (AWS_CONFIG_FILE). That file is regenerated each time the emulator starts. Following the official documentation, I copied the configuration file and pointed AWS_CONFIG_FILE at the copy. With 5 MB parts, the ETag of the 20 MiB file was -4.
$ cp ~/.aws/emulator/9297/config ./mpu-config && AWS_CONFIG_FILE=./mpu-config aws configure set default.s3.multipart_chunksize 5MB
$ AWS_CONFIG_FILE=./mpu-config aws s3 cp --no-progress f20m.bin s3://cp-bucket/f20m-5mb.bin && aws s3api head-object --bucket cp-bucket --key f20m-5mb.bin --query ETag --output text
upload: ./f20m.bin to s3://cp-bucket/f20m-5mb.bin
"481a660235ae2a24731ccfbc0b469033-4"
With 16 MB parts, the upload failed with HTTP 413 (Content Too Large). The reason is explained in the next section. After the failure, list-multipart-uploads showed no incomplete uploads.
$ AWS_CONFIG_FILE=./mpu-config aws configure set default.s3.multipart_chunksize 16MB && AWS_CONFIG_FILE=./mpu-config aws s3 cp --no-progress f20m.bin s3://cp-bucket/f20m-16mb.bin
upload failed: ./f20m.bin to s3://cp-bucket/f20m-16mb.bin An error occurred (413) when calling the UploadPart operation: Content Too Large
$ aws s3api list-multipart-uploads --bucket cp-bucket --query "Uploads[].Key"
null
Size limits the emulator enforces
The version of the emulator I tested had three size limits. Neither the limits section nor the command reference in the official documentation lists these numbers. The following are the results and error messages from my test environment.
The first is the size of a single request. put-object accepted 15 MiB (15,728,640 bytes), but 16 MiB (16,777,216 bytes) returned 413. In the previous section, when aws s3 cp used 16 MB parts, the UploadPart request that sends each part was rejected with the same 413. Parts of 5 MB and 8 MB (the default) were accepted. I did not determine the exact boundary.
$ head -c 15728640 /dev/zero > z15 && aws s3api put-object --bucket limit-bucket --key z15 --body z15 --query ETag --output text
"14b17234e237505421b6492b8d757507"
$ head -c 16777216 /dev/zero > z16 && aws s3api put-object --bucket limit-bucket --key z16 --body z16 --query ETag --output text
aws: [ERROR]: An error occurred (413) when calling the PutObject operation: Content Too Large
The second is the total that can be stored in one bucket, which the error message gave as 67,108,864 bytes (64 MiB). In an empty bucket, I kept sending 5 MiB parts, and the 13th one returned ValidationException. At that point the bucket held no objects. Incomplete parts also count toward the total, so put-object of a 5 MiB file was rejected for the same reason.
$ for n in $(seq 1 20); do aws s3api upload-part --bucket limit-bucket --key cap.bin --upload-id "$CAP_ID" --part-number $n --body part-00 --query ETag --output text > /dev/null || { echo "part $n failed"; break; }; done
aws: [ERROR]: An error occurred (ValidationException) when calling the UploadPart operation: recording part 13 would leave the bucket "limit-bucket" holding 68158298 bytes, past the 67108864 bytes this emulator keeps per bucket
part 13 failed
$ aws s3 ls s3://limit-bucket/ --recursive --summarize
Total Objects: 0
Total Size: 0
$ aws s3api put-object --bucket limit-bucket --key after.bin --body part-00 --query ETag --output text
aws: [ERROR]: An error occurred (ValidationException) when calling the PutObject operation: storing "after.bin" would leave the bucket "limit-bucket" holding 68158331 bytes of objects, past the 67108864 bytes this emulator keeps per bucket
The third is the total that can be stored across the entire emulator, which the error message gave as 134,217,728 bytes (128 MiB). I sent parts in the same way to another bucket, limit-bucket-2, and the 11th one returned ValidationException, stating that the total across all buckets would exceed the limit. That total also included the incomplete parts in limit-bucket and the big.bin and small.bin objects stored in example-bucket.
$ for n in $(seq 1 20); do aws s3api upload-part --bucket limit-bucket-2 --key cap.bin --upload-id "$CAP2_ID" --part-number $n --body part-00 --query ETag --output text > /dev/null || { echo "part $n failed"; break; }; done
aws: [ERROR]: An error occurred (ValidationException) when calling the UploadPart operation: recording part 11 would leave this emulator holding 134219464 bytes across every bucket, past the 134217728 bytes it keeps in total
part 11 failed
After I stopped the two uploads with abort-multipart-upload, the put-object that had been rejected succeeded.
$ aws s3api abort-multipart-upload --bucket limit-bucket-2 --key cap.bin --upload-id "$CAP2_ID"
$ aws s3api abort-multipart-upload --bucket limit-bucket --key cap.bin --upload-id "$CAP_ID"
$ aws s3api put-object --bucket limit-bucket --key after.bin --body part-00 --query ETag --output text
"24e71e3a91d42729991e2099c7395617"
If you run many multipart upload tests in the emulator in a row without aborting the leftover uploads, the accumulated incomplete parts can cause unrelated uploads to be rejected with ValidationException. Clean up by checking list-multipart-uploads and aborting any leftover uploads, or restart the emulator to begin with an empty state. According to the limits section of the official documentation, the emulator keeps all resources in memory and deletes them when it stops. A separate article, "How to Start from an Empty State for Each Test with AWS Emulator," covers how to work this way.





