I found the problem. I took a wireshark trace of the session and found that the error was actually returned from the server halfway through the put although, of course, s3sync doesn't see the error until it has finished sending the file.
The full text was:
Code:
HTTP/1.1 400 Bad Request
x-amz-request-id: XXXXXXXXXXXXXXXX
x-amz-id-2: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Wed, 28 Nov 2007 11:09:42 GMT
Connection: close
Server: AmazonS3
15c
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>RequestTimeout</Code><Message>Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.</Message><RequestId>XXXXXXXXXXXXXXXX</RequestId><HostId>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</HostId></Error>
x-amz-request-id: XXXXXXXXXXXXXXXX
x-amz-id-2: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Wed, 28 Nov 2007 11:09:42 GMT
Connection: close
Server: AmazonS3
15c
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>RequestTimeout</Code><Message>Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.</Message><RequestId>XXXXXXXXXXXXXXXX</RequestId><HostId>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</HostId></Error>
The problem is the "file transfer" having problems which are noticed by the other end. I understand that (I am using a fairly flaky and relatively slow connection involving long distance rural WiFi).
I guess it would be good if s3sync could display the response text on an HTTP error, which would make it easier to find this sort of problem in the future.
Graham