Cloudformation CloudFront CachePolicy showing invalid request provided

0

I am using AWS CLI together with a yaml file to deploy my CloudFront resource. I am aiming to add a CachePolicy to my CloudFront distribution but I am always getting an "Invalid request provided" error on Cloudformation in AWS console. Is my yaml wrong or am I missing something?

Here is a snippet of the cache policy and response headers policy I am using:Enter image description here

已提問 2 年前檢視次數 336 次
1 個回答
2
已接受的答案

If you have provided CookieBehavior, HeaderBehavior, and QueryStringBehavior with whitelist value, then you must also provide a list of values that must be included for those parameters. The values should be listed in the the corresponding Cookies, Headers, and QueryStrings parameter for each config.

Example for HeadersConfig:

          HeadersConfig: 
            HeaderBehavior: whitelist
            Headers:
              - Authorization
profile picture
joahna
已回答 2 年前
profile pictureAWS
專家
Toni_S
已審閱 2 年前

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

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

回答問題指南