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.

feita há 3 anos3279 visualizações
4 Respostas
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
respondido há 10 meses
  • Omg, thank you! This saved my bacon today.

0
Resposta aceita

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

Monim
respondido há 3 anos
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
respondido há 3 anos
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.

respondido há 5 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas