{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/1125","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/1125/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1125/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/1125/events","html_url":"https://github.com/aws/aws-cli/issues/1125","id":56532949,"number":1125,"title":"aws s3 sync returns non-zero code when all is fine","user":{"login":"lukaszbudnik","id":1637066,"avatar_url":"https://avatars.githubusercontent.com/u/1637066?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaszbudnik","html_url":"https://github.com/lukaszbudnik","followers_url":"https://api.github.com/users/lukaszbudnik/followers","following_url":"https://api.github.com/users/lukaszbudnik/following{/other_user}","gists_url":"https://api.github.com/users/lukaszbudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaszbudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaszbudnik/subscriptions","organizations_url":"https://api.github.com/users/lukaszbudnik/orgs","repos_url":"https://api.github.com/users/lukaszbudnik/repos","events_url":"https://api.github.com/users/lukaszbudnik/events{/privacy}","received_events_url":"https://api.github.com/users/lukaszbudnik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-04T14:30:32Z","updated_at":"2015-02-09T17:23:40Z","closed_at":null,"body":"Hi awscli team,\r\n\r\nI'm using awscli from pip:\r\n\r\n```$ aws --version\r\naws-cli/1.7.4 Python/2.7.8 Darwin/13.3.0```\r\n\r\nWhen I execute sync between bucket and local folder like this:\r\n\r\n```aws s3 sync \"s3://${env}-yyy\" \"${env}-yyy\" > output.txt 2>&1```\r\n\r\nSync executes fine ${env} is substituted with the correct env variable. In test bucket I have some test files added: max file size is around 2 kb and the number of files is around 60. All files are fetched fine, but when I check the return code the return code is always 2.\r\n\r\nWhen I execute my sync command with --debug and do this:\r\n\r\n```grep 'HTTP Response Code’ output.txt```\r\n\r\nall files were downloaded OK: \r\n\r\n```Thread-13 - awscli.errorhandler - DEBUG - HTTP Response Code: 200```\r\n\r\ndoing:\r\n\r\n```grep 'Received print task' output.txt```\r\n\r\ngives for all files:\r\n\r\n```error=False, total_parts=None, warning=None```\r\n\r\naws s3 sync is a part of much larger bash script for disaster recovery and I really need to distinguish when sync failed or not (error reporting is very important to me).\r\n\r\nCould you take a look at it?\r\n"},"comment":{"url":"https://api.github.com/repos/aws/aws-cli/issues/comments/73550105","html_url":"https://github.com/aws/aws-cli/issues/1125#issuecomment-73550105","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/1125","id":73550105,"user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T17:23:40Z","updated_at":"2015-02-09T17:23:40Z","body":"So a return code of 2 means that some files were skipped in your sync but all of the files that were transferred succeeded. A return code of 1 means that at least one of your transfers failed. The skipped files are printed to standard error (even when you do not add ``--debug``). So if you could figure out what files are being skipped I can provide you with more information why. If I were to guess, the message you are getting is somewhat related to this issue: https://github.com/aws/aws-cli/issues/1082"}}