the page works as expectedWhat should the developer do so that the content of the page matches the language that the developer selects?
Create a new CloudFront origin request policy. Set the query string option to All. Update the CloudFront distribution to use the new cache policy.
Create a new CloudFront cache policy. Set the minimum and maximum TTL to 1 hour. Update the CloudFront distribution to use the new cache policy.
Create a new CloudFront cache policy. Set the query string option to None. Update the CloudFront distribution to use the new cache policy.
Create a new CloudFront cache policy. Set the query string option to Whitelist, and include the language string. Update the CloudFront distribution to use the new cache policy.
Explanations:
The origin request policy controls how CloudFront interacts with the origin server, but it doesn’t affect caching behavior. This won’t solve the issue of serving content based on the query string.
Setting TTLs (Time to Live) does not directly address the issue of caching based on the query string. The query string parameter must be considered for caching, which isn’t addressed by adjusting TTL values alone.
Setting the query string option to None will ignore the query string when caching, meaning that CloudFront will cache content based on the URL alone. This results in always serving the default English content.
By setting the query string option to Whitelist and including the ‘language’ parameter, CloudFront will cache different versions of the content for each language. This ensures that the content matches the language specified in the query string.