Skip to content

Deletes a CloudFront function

Description

Deletes a CloudFront function.

You cannot delete a function if it's associated with a cache behavior. First, update your distributions to remove the function association from all cache behaviors, then delete the function.

To delete a function, you must provide the function's name and version (ETag value). To get these values, you can use list_functions and describe_function.

Usage

cloudfront_delete_function(Name, IfMatch)

Arguments

  • Name

    [required] The name of the function that you are deleting.

  • IfMatch

    [required] The current version (ETag value) of the function that you are deleting, which you can get using describe_function.

Value

An empty list.

Request syntax

svc$delete_function(
  Name = "string",
  IfMatch = "string"
)