aws / aws/aws-cli

Undocumented key-marker parameter in s3api list-object-versions

Open
#5,616 3 comments 0 reactions 0 assignees View on GitHub
confusing-error documentation feature-request needs-discussion p3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

Confirm by changing [ ] to [x] below to ensure that it's a bug:
- [x] I've gone though the [User Guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) and the [API reference](https://docs.aws.amazon.com/cli/latest/reference/)
- [x] I've searched for [previous similar issues](https://github.com/aws/aws-cli/issues) and didn't find any solution

**Describe the bug**
The documentation for the `aws s3api list-object-versions` command does not fully describe the key-marker

**SDK version number**
aws-cli/1.18.154 Python/3.6.9 Linux/5.4.0-48-generic botocore/1.18.13

**Platform/OS/Hardware/Device**
Ubuntu 18.04

**To Reproduce (observed behavior)**

View documentation for the command.

```
aws s3api list-object-versions help
```

Search for "key-marker".

```
/key-marker
```

The request parameter is referenced in the output section, but it is not listed as one of the parameters in the synopsis and the options.

Synopsis:

```text
SYNOPSIS
list-object-versions
--bucket
[--delimiter ]
[--encoding-type ]
[--prefix ]
[--expected-bucket-owner ]
[--cli-input-json ]
[--starting-token ]
[--page-size ]
[--max-items ]
[--generate-cli-skeleton ]
```

Output:

```text
NextKeyMarker -> (string)
When the number of responses exceeds the value of MaxKeys , NextKey-
Marker specifies the first key not returned that satisfies the
search criteria. Use this value for the key-marker request parameter
in a subsequent request.
```

**Expected behavior**

The parameter should be documented in the synopsis and the options.

**Additional context**

It's a particularly unfortunate omission because most of the s3api commands that work with objects take `--key` as a parameter, which I naively passed when using this command for the first time. awscli by design presumably matches `--key` to `--key-marker` or something similar.

It confused me for quite a long time.

The correct parameter to use in my case was `--prefix`.

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.