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

1 réponse
2
Réponse acceptée

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
répondu il y a 2 ans
profile pictureAWS
EXPERT
Toni_S
vérifié il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions