s3tools/s3cmd — pull request #193 by evobilis (2013-06-30 03:30:59+00:00)
Title: Manage files that was not remote copy to upload them directly

I was using the tool to sync files between my local folders and the remote folders on S3. I setup S3 to archive to Glacier files after 10 days.

I tried to sync my folder 12 days later I got the following error:
S3 error: 403 (InvalidObjectState): Operation is not valid for the source object's storage class

The tool could not remote copy an object that was already on Glacier. Hence it raised an error, stop the process and my files were not synchronised anymore.

I fixed it by catching the file that could nto be copied and re-upload them directly without using remote copy.