In the next sections, you use Lambda@Edge to generate a web page dynamically. Instead of printing the raw request headers, the function returns their values in an HTML table. You will grant permissions to Lambda@Edge, write and deploy the function code, test it, and then use the function logs and metrics to troubleshoot it.
In this section, you create a new cache behavior in your CloudFront distribution. Later, you attach the Lambda@Edge function to this cache behavior.

/serverless
The path pattern /serverless has no wildcard, so this behavior matches only requests to exactly /serverless. Requests such as /serverless/abc still fall through to the other behaviors.

CachingDisabled makes CloudFront forward every request to the origin, so each request runs the function and returns fresh content. AllViewer forwards all viewer headers, cookies and query strings, so the function can read every request header.

The Last modified field shows Deploying while CloudFront pushes the change to all edge locations. Wait until it shows a date and time before you test the /serverless path.