how to debug CDK + CloudFormation: Received response status [FAILED] from custom resource. Message returned: UnknownError error during deployment ?

0

Trying to deploy a stack created with CDK got the error. Received response status [FAILED] from custom resource. Message returned: UnknownError. Just want to know how to debug it ? how can I get more information ? a Unknown error is not pretty helpful.

Deployment failed: Error: The stack named production-production-asset-distribution failed to deploy: CREATE_FAILED (The following resource(s) failed to create: [parentHostedZoneId0F50DFEF, productionproductionassetdistributionassetsCertificateArnC9D52D23]. ): Received response status [FAILED] from custom resource. Message returned: UnknownError (RequestId: c4f8f6b2-8922-44d5-8cf5-93f65bfbbea7), Received response status [FAILED] from custom resource. Message returned: UnknownError (RequestId: 3e55bf27-3184-419a-9f4b-e91d00c1b7da

I tried several times to delete the complete stack and redeploy but same error. on Cloudwatch I just see a pretty similar message.

Any north will be appreciated. Thanks

2개 답변
0

Can you check whether creation of the ACM certificate (or its validation) was successful?

profile picture
전문가
답변함 한 달 전
  • Hi, no It was not created.

  • Then that was the root cause

  • Thanks again. I do agree the root cause is that the Certificate can't be created. I would love to know the reason, I have spent a lot of time in the logs but I just see UnknownError, which is not a straightforward error message.

0

Check the CloudFormation event log and CloudTrail logs for details on the failed custom resource creation. Look for error codes or messages that may provide more context on the failure.

Deploy a simple test stack with just the custom resource to isolate if the issue is with the custom resource itself or interactions with other resources.

Verify the IAM role used by the custom resource has the necessary permissions. A missing permission could result in an unknown error.

Check for any logs or outputs from the custom resource itself. Some custom resources write logs or provide status outputs that could help debug issues.

Use the AWS Support troubleshooting runbook for custom resources. This provides guided steps to help diagnose common causes of custom resource failures like missing dependencies or configuration errors.

profile picture
전문가
답변함 한 달 전
  • Thanks in advance Giovanni. Can I ask, Why a permission problem led to an unknown error? I mean, what else can lead to unknown error ?
    is this documented anywhere ? And sorry to bother but where I can find the AWS Support troubleshooting runbook for custom resources? regards,

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

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

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

관련 콘텐츠