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.

asked 3 years ago3199 views
4 Answers
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
answered 9 months ago
  • Omg, thank you! This saved my bacon today.

0
Accepted Answer

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

Monim
answered 3 years ago
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
answered 3 years ago
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.

answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions

Relevant content