I'm trying to use cloud formation (YAML template file) to deploy a CloudFront Function in my stack. How do I specify the FunctionCode (AWS docs) property for my CloudFront Function?
AddHTMLPostfixFunction:
Type: AWS::CloudFront::Function
Properties:
Name: !Sub "${ApplicationName}-add-html-postfix"
AutoPublish: true
FunctionCode: "---> Path to my .js-file? <---"
FunctionConfig:
Comment: "Adds .html postfix to viewer requests"
Runtime: cloudfront-js-1.0
I'm unable to find any examples of this, other than the CLI commands that has been documented from AWS.