---
title: "DELETE /2020-05-31/function/{Name}#If-Match"
method: DELETE
path: "/2020-05-31/function/{Name}#If-Match"
---

# DELETE /2020-05-31/function/{Name}#If-Match

`DELETE /2020-05-31/function/{Name}#If-Match`

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 `ListFunctions` and `DescribeFunction`.

## Path parameters

- `Name` string, required

## Headers

- `If-Match` string, required

## Response `204`

Success

## Other responses

- `480` — InvalidIfMatchVersion
- `481` — NoSuchFunctionExists
- `482` — FunctionInUse
- `483` — PreconditionFailed
- `484` — UnsupportedOperation

---

[API](https://skmtc.net/aws/apis/cloudfront.md) · [All operations](https://skmtc.net/aws/apis/cloudfront/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/cloudfront/versions/fd674fc97471/schema)
