#10707·aws-cli

Corrupted .tar.gz files after transfer (checksum related?)

Author: darxmurfCreated Sep 30, 2026Updated Oct 1, 2026
Labelsbugneeds-triage

Describe the bug

Hi, I have a couple of .tar.gz files uploaded on a S3 server hosted in my university which are corrupted, or at least partially corrupted. Files uploaded from aws cli on a debian machine using

aws --endpoint-url=https://uni.server.tld s3 sync /my-folder/ s3://BUCKET-NR/archives/

When opening those files in a text editor, I can find a couple of lines containing 100000^M The ^M is a "DOS" carriage return in this case. There is one of those lines in the beginning of the file, then a few others later.

If I remove those lines, I can partially extract my archive but I still end with errors. After talking with the sysadmin in charge of the S3 server, he said the files got uploaded with aws-chuncked headers and I should re-upload them adding request_checksum_calculation = when_required in my conf.

But I don't have the original files anymore, so I need to find a way to fix those files. The curious point here is that I uploaded other files later and they look fine.

Is it aws client related or is there something wrong elsewhere? Thanks!

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Smooth transfer without adding headers/content

Current Behavior

Files got transferred with added content

Reproduction Steps

can't reproduce

Possible Solution

No response

Additional Information/Context

No response

CLI version used

2.23.6

Environment details (OS name and version, etc.)

linux debian stable