I'm configuring my CloudFront using CloudFormation, and on the AWS documentation page for the ForwardedValues
property, we can see the following statement:
If you specify true for
QueryString
and you don't specify any values forQueryStringCacheKeys
, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters.
The word in bold (caches) are causing some confusion, as the meaning of this sentence is completely dependent on caches being a verb or caches being a noun:
If I don't specify the QueryStringCacheKeys
, what is the behaviour of CloudFront?
If you don't specify the QueryStringCacheKeys
, but only this:
ForwardedValues:
QueryString: true
CloudFront will Forward all, cache based on all
, which means that the request will be cached based on url+querystring
and that the querystring is forwarded to the underlying system.
You can read more on this in the AWS documentation here.