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

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

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

Publishes a CloudFront function by copying the function code from the `DEVELOPMENT` stage to `LIVE`. This automatically updates all cache behaviors that are using this function to use the newly published copy in the `LIVE` stage.

When a function is published to the `LIVE` stage, you can attach the function to a distribution's cache behavior, using the function's Amazon Resource Name (ARN).

To publish 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 `200`

Success

## Other responses

- `480` — InvalidArgument
- `481` — InvalidIfMatchVersion
- `482` — NoSuchFunctionExists
- `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)
