Internal error when creating AWS::CloudFront::Function

1

I get:

Resource handler returned message: "null" (RequestToken: bd56596b-531f-6d7a-b65e-832baf8382fd, HandlerErrorCode: InternalFailure)

This is the template:

      WebCFFunction: {  
        Type: 'AWS::CloudFront::Function',  
        Properties: {  
          AutoPublish: true,  
          FunctionCode: (omitted ...),  
          Name: 'web-cf-function',  
        },  
      },  

The function can be created manually via the cloudfront console without issue.

已提问 3 年前3279 查看次数
4 回答
1

I encountered this issue even when FunctionCode and FunctionConfig present. It turns out to be an existing Function created at the previous CloudFormation deployment, when updating via Change Sets, it may cause this error.

Without further error messages, my educated guess is that the internal comparison of the change set returns an empty diff.

Changing the Name is our current workaround.

vicary
已回答 10 个月前
  • Omg, thank you! This saved my bacon today.

0
已接受的回答

Add FunctionConfig property to resolve the error. I had to add this property even though the documentation says it's optional.

Monim
已回答 3 年前
0

I'm seeing the same thing. What do you have for your FunctionCode block? I have tried fileb://filename.js and filename.js and the yaml multi line like FunctionCode: | (lines of javascript) with the same results.

Edited by: acaird on Sep 1, 2021 8:39 AM

acaird
已回答 3 年前
0

In my case, I got that error message because I already had another cloudfront function with the same name that I was trying to create.

已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则