Managing functions in CloudFront Functions
With CloudFront Functions, you can write lightweight functions in JavaScript for high-scale, latency-sensitive CDN customizations. After you write the function code, the following topics can help you create the function in CloudFront Functions, test it, update it, publish it, and associate it with a CloudFront distribution.
The full procedure for deploying a function is the following:
-
Create the function. The function is initially created in with sample function code. This code is valid, even in the live stage. The function exists in the Development stage.
-
Test, update, associate. When the function is in the Development stage, you can test the function, and update it (including associating a key value store with it).
-
Publish. When you're ready to use your function with a CloudFront distribution, you publish the function, which copies it from the
DEVELOPMENT
stage toLIVE
. -
Associate with a distribution. When the function is in the
LIVE
stage, you can associate the function with a distribution's cache behavior.
Topics
Most of the information is repeated from the request. Other information is added by CloudFront. Note the following:
-
ETag
: This value changes each time you modify the key value store. -
FunctionARN
-
Stage
-
Status