From what it appears, Cloudfront Path Pattern doesn't support complete regex.
What I want to achieve is to separate the requests /[a-z]*
from the requests /[a-z]/.+
to different origins.
So, a request /page
must have a different behavior from /page/something
. And I can't seem to figure out a way of doing this.
Put
/*/*
earlier in the path order (lower sequence number) and/*
later in the list.CloudFront uses first match, not best match and
/*/*
won't match anything without at least one slash in the middle of the path. Of course, the default behavior may make the second entry unnecessary.