AWS::CloudFront::Distribution FunctionAssociation - AWS CloudFormation
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

This is the new 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 CloudFormation template, use the following syntax:

JSON

{ "EventType" : String, "FunctionARN" : String }

YAML

EventType: String FunctionARN: String

Properties

EventType

The event type of the function, either viewer-request or viewer-response. You cannot use origin-facing event types (origin-request and origin-response) with a CloudFront function.

Required: No

Type: String

Allowed values: viewer-request | viewer-response | origin-request | origin-response

Update 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: 0

Maximum: 108

Update requires: No interruption