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

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

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

Updates a CloudFront function.

You can update a function's code or the comment that describes the function. You cannot update a function's name.

To update a function, you provide the function's name and version (`ETag` value) along with the updated function code. To get the name and version, you can use `ListFunctions` and `DescribeFunction`.

## Path parameters

- `Name` string, required

## Headers

- `If-Match` string, required

## Response `200`

Success

## Other responses

- `480` — InvalidArgument
- `481` — InvalidIfMatchVersion
- `482` — NoSuchFunctionExists
- `483` — PreconditionFailed
- `484` — FunctionSizeLimitExceeded
- `485` — 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)
