CloudFront Functions enable you to run lightweight JavaScript code at AWS edge locations to customize viewer requests and responses with low latency and high performance.
Adding a CloudFront Function
In the DuploCloud Portal, navigate to Cloud Services -> Networking.
Select the CloudFront tab.
Select the Functions tab.
Click Add. The Add Function page displays.
Add Function page
Complete the following fields:
Name
Enter a unique name for the CloudFront function.
Description
Provide a short description of what the function does.
Runtime Version
Select the runtime version to use, e.g., cloudfront-js-2.0.
Function Code
Enter the JavaScript code for your function in the editor.
Click Submit to create the CloudFront Function.
Once created, you can associate this function with CloudFront distributions to customize behavior at the edge.