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

0

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 年前檢視次數 1270 次
2 個答案
1

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?

AWS
已回答 2 年前
0

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.

--Syd

profile picture
Syd
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南