-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws s3 sync returns non-zero code when all is fine #1125
Comments
On my production Ubuntu machines I also get return code 2 for a successful sync. awscli used:
and
|
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 |
One thing that can cause a return code of 2 is when you do something like:
The first thing you will see in the output is: It will create So for @lukaszbudnik , does the Side question: are these return codes documented anywhere? It would be nice to have an idea how to handle these cases. Edit: Sorry, just clicked on the link to #1082 and noticed that everything I said is spelled out there. Sorry for the noise. |
hi guys, Indeed I see this warning in the --debug output. I added creating this directory before synchronising and now the return code is 0. Feel free to close this issue. thanks, |
Good to hear, thanks for the update. |
* chore(version): set 0.14.3.dev1 version (aws#1112) (aws#1113) * Depend on development version of lambda-builders for dev builds (aws#1111) * Depend on development version of lambda-builders for dev builds * Adding prod.txt to manifest * Splitting dev and tool dependencies * fix(build): Resolve path after .aws-sam is created (aws#1110) * fix(build): Resolve path after .aws-sam is created * fix: build (make pr) * Design and implementation for producing debug build artifacts (aws#1095) * design: Initial Design for producing debug artifacts * initial implementation * Adding unit tests * Integration test with debug build mode * Adjust Design doc and add keyword arg to a call * fix(dotnet): init template fixes (aws#1117) * chore(version): set 0.15.0 (aws#1125) * Revert "Depend on development version of lambda-builders for dev builds (aws#1111)" (aws#1128) This reverts commit 7e9de790e23791ba176faff2030286db4007e503. * Bumping to Lambda Builders 0.3.0 (aws#1129) Bumping to Lambda Builders 0.3.0 * fix(func-tests): add dependency manager param (aws#1130)
Hi awscli team,
I'm using awscli from pip:
$ aws --version aws-cli/1.7.4 Python/2.7.8 Darwin/13.3.0
When I execute sync between bucket and local folder like this:
aws s3 sync "s3://${env}-yyy" "${env}-yyy" > output.txt 2>&1
Sync 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.
When I execute my sync command with --debug and do this:
grep 'HTTP Response Code’ output.txt
all files were downloaded OK:
Thread-13 - awscli.errorhandler - DEBUG - HTTP Response Code: 200
doing:
grep 'Received print task' output.txt
gives for all files:
error=False, total_parts=None, warning=None
aws 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).
Could you take a look at it?
The text was updated successfully, but these errors were encountered: