You can update a function at any time. The changes are made only to the version of the
function that is in the DEVELOPMENT
stage. To copy the updates from the
DEVELOPMENT
stage to LIVE
, you must publish the function.
You can update a function's code in the CloudFront console or with the AWS Command Line Interface (AWS CLI).
To update function code
-
Sign in to the CloudFront console at https://console.aws.amazon.com/cloudfront/v4/home#/functions
and choose the Functions page. Choose the function to update.
-
Choose Edit and make the following changes:
-
Update any fields in the Details section.
-
Change or remove the associated key value store. For more information about key value stores, see Amazon CloudFront KeyValueStore.
-
Change the function code. Choose the Build tab, make changes, then choose Save changes to save changes to the code.
-
Most of the information is repeated from the request. Other information is added by CloudFront.
Notes
-
ETag
– This value changes each time you modify the key value store. -
FunctionARN
– The ARN for your CloudFront function. -
Stage
– The stage for the function (LIVE
orDEVELOPMENT
). -
Status
– The status of the function (PUBLISHED
orUNPUBLISHED
).