exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 281 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 281
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer is building an application that supports multiple languages. The directory structure and file names for all versions of the website are identical. When a user views the website, the preferred language is added as a query string parameter. The following is an example of the URL: http://d111111abcdef2.doudfront.net/main.html?language=de.

The query string is passed to Amazon CloudFront. No matter which language the developer selects, the English page is returned. If the developer accesses the website directly and bypasses CloudFront. the page works as expected

What should the developer do so that the content of the page matches the language that the developer selects?

  • A. Create a new CloudFront origin request policy. Set the query string option to All. Update the CloudFront distribution to use the new cache policy.
  • B. 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.
  • C. Create a new CloudFront cache policy. Set the query string option to None. Update the CloudFront distribution to use the new cache policy.
  • D. 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.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
pranay_2406
1 year, 12 months ago
Selected Answer: D
It's D. By creating a new CloudFront cache policy and setting the query string option to Whitelist, the developer can specify which query string parameters should be used to differentiate the cached objects. In this case, the language string should be included in the whitelist. By including the language string in the query string, CloudFront will consider it as part of the cache key, allowing it to serve the appropriate language-specific content. Once the new cache policy is created, the developer needs to update the CloudFront distribution to use the new cache policy. This ensures that CloudFront applies the desired cache behavior, taking into account the language parameter in the query string. Option C (creating a new CloudFront cache policy with the query string option set to None) would not differentiate the cached objects based on the language parameter, resulting in the same English page being returned regardless of the selected language.
upvoted 1 times
...
KT_Yu
2 years, 4 months ago
Selected Answer: D
D Query string forwarding and caching CloudFront can cache different versions of your content based on the values of query string parameters. Choose one of the following options: None (Improves Caching) Choose this option if your origin returns the same version of an object regardless of the values of query string parameters. This increases the likelihood that CloudFront can serve a request from the cache, which improves performance and reduces the load on your origin. Forward all, cache based on whitelist Choose this option if your origin server returns different versions of your objects based on one or more query string parameters. Then specify the parameters that you want CloudFront to use as a basis for caching in the Query string whitelist field. Forward all, cache based on all Choose this option if your origin server returns different versions of your objects for all query string parameters.
upvoted 2 times
...
hamimelon
2 years, 5 months ago
I think both A and D work.
upvoted 1 times
hamimelon
2 years, 5 months ago
Changed my mind. It should be D
upvoted 1 times
okog
2 years, 5 months ago
Please explain to me how the answer is D and not C
upvoted 1 times
...
...
...
lrom
2 years, 5 months ago
Selected Answer: D
I think D to improve cache hit: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesQueryStringWhiteList
upvoted 3 times
...
k1kavi1
2 years, 5 months ago
Selected Answer: A
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html
upvoted 1 times
...
kapil206001
2 years, 5 months ago
A https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago