aws / aws/aws-cli

aws s3 cp without recursive can produce a useless error message

Open
#3,544 7 comments 2 reactions 0 assignees View on GitHub
automation-exempt confusing-error enhancement feature-request p2 s3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

Without `--recursive`:
```
aws s3 cp ./{DIRECTORY} s3://{BUCKET}/
upload failed: {DIRECTORY}/ to s3://{BUCKET}/ Parameter validation failed:
Invalid length for parameter Key, value: 0, valid range: 1-inf
```

With `--recursive`:
```
aws s3 cp --recursive ./{DIRECTORY} s3://{BUCKET}/
upload: ...
```

When searching for that error, the first result on google is about issue #2929 which as been closed for no apparent reason.
![screen shot 2018-09-05 at 11 06 23 am](https://user-images.githubusercontent.com/2412909/45102473-d31d6900-b0fb-11e8-9660-f9b375b7d3f3.png)

This comment says it all https://github.com/aws/aws-cli/issues/2929#issuecomment-393869946

Please improve that message...

Version info:
```
➜ workspace aws --version
aws-cli/1.15.50 Python/3.7.0 Darwin/17.7.0 botocore/1.10.49
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.