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 Antworten
0

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

profile picture
EXPERTE
beantwortet vor einem Monat
  • 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
EXPERTE
beantwortet vor einem Monat
  • 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,

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen