This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::CloudFront::Distribution FunctionAssociation
A CloudFront function that is associated with a cache behavior in a CloudFront distribution.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "EventType" :String, "FunctionARN" :String}
YAML
EventType:StringFunctionARN:String
Properties
EventType-
The event type of the function, either
viewer-requestorviewer-response. You cannot use origin-facing event types (origin-requestandorigin-response) with a CloudFront function.Required: No
Type: String
Allowed values:
viewer-request | viewer-response | origin-request | origin-responseUpdate requires: No interruption
FunctionARN-
The Amazon Resource Name (ARN) of the function.
Required: No
Type: String
Pattern:
arn:aws:cloudfront::[0-9]{12}:function\/[a-zA-Z0-9-_]{1,64}Minimum:
0Maximum:
108Update requires: No interruption