Common Prefix, Prefix Pattern, and Wildcards
The Amazon S3 origin appends the common prefix to the prefix pattern to define the objects that the origin processes. You can specify an exact prefix pattern or you can use Ant-style path patterns to read multiple objects recursively.
Ant-style path patterns can include the following wildcards:
- Question mark (?) to match a single character
- Asterisk (*) to match zero or more characters
- Double asterisks (**) to match zero or more directories
For example, to process all log files in
US/East/MD/
and all nested
prefixes, you can use the following common prefix and prefix
pattern:Common Prefix: US/East/MD/
Prefix Pattern: **/*.log
If the unnamed nested prefixes that you want to include appear earlier in the hierarchy,
such as
US/**/weblogs/
, you can include the nested prefixes in the
prefix pattern or define the entire hierarchy in the prefix pattern, as
follows:Common Prefix: US/
Prefix Pattern: **/weblogs/*.log
Common Prefix:
Prefix Pattern: US/**/weblogs/*.log