Multiple Origins for Cloudfront, not allowing me to change Behaviors Order


Hi, I have two S3 buckets that can be used by one site, therefore I am trying to combine the two with Cloudfront by adding the S3 buckets to the origins in Cloudfront settings. However, I have an issue when it comes to changing the Precedence order. I wish that the newly added Behaviors is the second one ( Precedence 1 ) however once it's created the option to move up the first Behavior its greyed out. I'm not able to find documentation to why this option is greyed out. Any advice or help, please?

Both these s3 buckets have the same folder structure which is /wp-content.

Thank you

2 Answers

When you have only two cache behavior, you can't change the order because the default one is always the last to be processed. Could you share a bit more details on what you're trying to achieve?

answered 2 months ago

You have two buckets with same folder structure ie /wp-content but the path pattern when configuring the behavior has to be unique and the first origin created would map to the default (*) path. The closest you can come to changing the order is to swap the origins for paths with precedence 0 and 1 (in behavior tab). That would also reverse the path pattern mappings. (so you need to understand what you want to accomplish in terms of path pattern matches by changing the precedence since it's not clear with info provided)

You can also add a path pattern for bucket 1 and bucket2 respectively and leave the default path set to either of the buckets. But again that depends on what path pattern matching you want to set up.


profile picture
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions