I'm trying to get all objects including different versions of the same object as well. According to aws official documents, it has Prefix and KeyMarker. I can't see any special difference between them. It says both like below,
- KeyMarker — (String) Specifies the key to start with when listing objects in a bucket.
- Prefix — (String) Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes.
I'd like you to take an example to get to know it if possible. Thanks.
FYI) I took an example like my bucket name is example and my file is located in app/a.json in the bucket. In that case, it can call listObjectVersions with the param: { Bucket: "example", "Prefix": "app/a.json" } but doesn't work with { Bucket: "example", "KeyMarker": "app/a.json" }