I've seen some references to this on the list but don't see a solution. In my case, I'm doing a multi-part upload and frequently am getting Errno 22:
file info ... [part 1 of 2708, 5MB]
5242880 of 5242880 100% in 26s 193.01 kB/s done
file info ... [part 2 of 2708, 5MB]
4526080 of 5242880 86% in 22s 192.25 kB/s failed
WARNING: Upload failed:
file info ...?partNumber=2&uploadId=.YhljWZhw0xyaH8ZhDOhbRx.3Wajk1aqKiUgrH
V193FiC2dsBM20CdSUSK9mbx2kY3YVc3s36b2.crwz.Ptz1t.oURjPaVb8brw7UIjk8dXL ([Errno 22] Invalid argument)
WARNING: Waiting 3 sec
etc, sometimes it will make it through, sometimes it finally bails on the file, and at times it's in part 500+ when it bails which means I've wasted a lot of bandwidth trying to upload the file!
My full command line is:
/usr/local/bin/s3cmd --multipart-chunk-size-mb=5 -c ~/.s3cfg.vacuworx sync [source] s3://[destination]
I added the chunk size thinking maybe it was related to the chunks being too large and also to make it so that when it retries it doesn't have as much to re-do, but that didn't solve the issue. It's not happening all the time, and definitely not on each chunk, but it's happening frequently enough on my large files that it's causing them to fail.
"This e-mail has been transmitted using 100% recycled electrons."