Skip to content
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 cp" silently fails if local storage exhausted #2430

Closed
cswarth opened this issue Feb 7, 2017 · 4 comments
Closed

"aws s3 cp" silently fails if local storage exhausted #2430

cswarth opened this issue Feb 7, 2017 · 4 comments
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. s3transfer s3

Comments

@cswarth
Copy link

cswarth commented Feb 7, 2017

Copying a large file from S3 will SILENTLY fail when the local storage is insufficient to contain the file. After the failure, the exit code indicates success and no error message is produced.

$ aws s3 cp s3://somebucket/largefile.iso largefile.iso
Completed 186 of 490 part(s) with 1 file(s) remaining
$ echo $?
0
$ df .
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda1       8115168 6333960   1345932  83% /

Don't be fooled by the fact that there is still space left on the device. aws is downloading the file to a temporary filename which it will rename upon success. Upon failure, it cleans up the temporary file, but the local disk was full while the temp file was in place.

Just to be clear:
I expect an error if the copy fails. The failure that occurred is undetectable.

@stealthycoin stealthycoin added feature-request A feature should be added or improved. s3 s3transfer labels Feb 7, 2017
@stealthycoin
Copy link
Contributor

Seems reasonable to me. Marking as feature request.

@stealthycoin
Copy link
Contributor

Actually, try upgrading and see what you get, it should already do this.

pip install --upgrade awscli

@stealthycoin stealthycoin added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 7, 2017
@cswarth
Copy link
Author

cswarth commented Feb 7, 2017

Yay! It does work in a recent version (aws-cli/1.11.44).

Previously I was running old crud from apt-get install awscli

@cswarth cswarth closed this as completed Feb 7, 2017
@stealthycoin
Copy link
Contributor

Glad it works for you!.

Yea apt-get we have no control over, it's quite out of date, stick with pip we maintain those packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved. s3transfer s3
Projects
None yet
Development

No branches or pull requests

2 participants