Create functions
You create a function in two stages:
-
Create the function code as JavaScript. You can use the default example from the CloudFront console or write your own. For more information, see the following topics:
-
Use CloudFront to create the function and include your code. The code exists inside the function (not as a reference).
After you create the function, it's added to the DEVELOPMENT stage. We recommend that you test your function before you publish it. After you publish your function, the function changes to the LIVE stage.