You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> aws s3 cp s3://my-bucket/my-prefix -
A client error (404) occurred when calling the HeadObject operation: Not Found
doesn't seem like the CLI can really do much with that. We interpret that as you wanting to download the s3://mybucket/my-prefix key to stdout. We have no way of knowing that you meant a prefix. It's the same situation if you have aws s3 cp s3://bucket/somekey /tmp/myfile. We assume you want to download the somekey file to /tmp/myfile.
The second case with the --recursive option on the other hand, seems like something we should be able to validate. If you want to stream to stdout, then --recursive should not be allowed and we should error out.
I agree with the reasoning to leave behavior as is for the case without --recursive.
When --recursive is used, I would have expected the behavior to be idiomatic with the other options and commands. Traverse the prefix in whatever the normal order is, streaming each key to stdout.
Barring this, I agree with erroring out at argument parsing with a good message, and adding a line to the docs for each option, specifying that they can't be used together.
aws-cli/1.10.1 Python/2.7.6 Darwin/14.3.0 botocore/1.3.23
When used with a prefix, "-" stream to stdout option errors with a 404, with or without
--recursive
flag.If this use of the option is not allowed, perhaps the documentation should be updated to reflect.
The text was updated successfully, but these errors were encountered: