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년 전3250회 조회
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.

답변함 4달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인