Object key prefix
An object key prefix is an initial string used to select or organize object keys.
S3 general-purpose bucket listings match keys that start with the supplied prefix; the match need not end at a slash. A prefix is not itself a directory or a separately stored parent object. [1]
A delimiter groups deeper matches into CommonPrefixes. Each group consumes one MaxKeys result slot, and its member objects are not also returned individually in that response. Group counts are therefore not descendant-object counts. [2]
Folder creation in the S3 console writes a zero-byte marker, but shared prefixes can produce folder views without that marker. A slash-ending key alone does not establish a zero-byte payload. [3]
S3 directory buckets use a different, hierarchical namespace. Their non-empty ListObjectsV2 prefixes must end in a slash, and the only supported delimiter is a slash. [4] [2]
Relations
- related
- Object key, Object storage
Advantages
- Prefix filtering and delimiter grouping support browsing a selected portion of a namespace. [1]
Limitations
- A grouped listing is not a complete inventory of the objects inside each returned group. [2]