timkay / aws

Easy command line access to Amazon EC2, S3, SQS, ELB, and SDB
http://timkay.com/aws/
424 stars 123 forks source link

S3 put can fail, but aws still returns zero #82

Closed staticfloat closed 9 years ago

staticfloat commented 9 years ago

I have an aws put as part of an automated buildbot script, and typically when something goes wrong, aws will return a nonzero exit status so that I can stop the rest of my script from running. In this case however, curl looks like it failed, but aws still returned zero. The output from curl says:

curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104

The command used to invoke aws was:

~/bin/aws put 'x-amz-acl: public-read' julianightlies/bin/osx/x64/0.4/julia-0.4.0-5039cb1011-osx.dmg /tmp/julia_package/Julia-0.4.0-dev-5039cb1011.dmg
timkay commented 9 years ago

See https://github.com/timkay/aws/wiki/Scripting-with-%22aws%22

Please let me know if it helps.

Also, you can use --public instead of 'x-amz-acl: public-read'

staticfloat commented 9 years ago

Excellent, thank you. I think that's exactly what I'm looking for.