AWS DevOps Engineer Professional Practice Test

Question: 1 / 400

At which points during a request/response cycle can Lambda@Edge be used to modify data contents?

Before the request is received and before the response is sent

After request from viewer, before forwarding to origin, after origin response, before sending to viewer

The answer is that Lambda@Edge can be used to modify data contents at several key points during the request/response cycle, specifically after the request from the viewer and before forwarding it to the origin, as well as after receiving the response from the origin and before sending it back to the viewer.

This flexibility allows developers to implement custom logic at different stages of the process. For instance, you might want to make changes to the HTTP headers or URL parameters based on specific request attributes right after the viewer sends the request, but before it reaches the origin server. This allows for optimizations or security checks to be performed early on.

Then, the Lambda function can also process the response from the origin before it is sent back to the viewer. This could involve modifying response headers, injecting caching behavior, or even altering the content of the response itself to fit specific application needs.

In contrast, the other options do not capture the full range of capabilities offered by Lambda@Edge. Limiting it to just viewer request and response overlooks the key points of interaction that allow for meaningful transformation of both incoming requests and outgoing responses. Thus, the comprehensive functionality of Lambda@Edge at multiple stages of the request/response cycle is effectively highlighted by the chosen option.

Get further explanation with Examzify DeepDiveBeta

Only during viewer request and viewer response

Before forwarding to origin and only after receiving origin response

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy