---
type: resource-type
title: CfFunction
description: aws resource type AWS::CloudFront::Function
name: CfFunction
lexicon: aws
resource_type: AWS::CloudFront::Function
---
`AWS::CloudFront::Function`, a resource type of the aws lexicon.

## Properties

- `FunctionCode` (`string`, required): The function code. For more information about writing a CloudFront function, see [Writing function code for CloudFront Functions](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html) in the *Amazon CloudFront Developer Guide*.
- `FunctionConfig` (`CfFunction_FunctionConfig`, required): Contains configuration information about a CloudFront function.
- `Name` (`string`, required): A name to identify the function.
- `AutoPublish` (`boolean`, optional): A flag that determines whether to automatically publish the function to the ``LIVE`` stage when it’s created. To automatically publish to the ``LIVE`` stage, set this property to ``true``.
- `FunctionARN` (`string`, optional)
- `FunctionMetadata` (`CfFunction_FunctionMetadata`, optional): Contains metadata about a CloudFront function.
- `Stage` (`string`, optional)
- `Tags` (`CfFunction_Tag[]`, optional): A complex type that contains zero or more ``Tag`` elements.

## Attributes

- `FunctionARN`
- `FunctionMetadata.FunctionARN`
- `Stage`
