Skip to content
Latchkey

Amplify "Received response status [FAILED] from custom resource" in CI

A category stack includes a CloudFormation custom resource backed by a Lambda. That Lambda returned FAILED (or timed out), so CloudFormation rolls the stack back and amplify push reports the custom resource failure.

What this error means

amplify push fails and the CloudFormation events show "Received response status [FAILED] from custom resource. Message returned: ..." against a category nested stack.

amplify
CREATE_FAILED  AWS::CloudFormation::CustomResource  UserPoolClientLambdaResource
Received response status [FAILED] from custom resource.
Message returned: User pool client configuration is invalid.

Common causes

The custom resource Lambda raised or timed out

The backing Lambda hit an invalid configuration, a permission gap, or exceeded its timeout before sending SUCCESS, so CloudFormation treats it as FAILED.

An invalid backend parameter for the category

A bad value in the category config (a malformed Cognito setting, an overlapping name) makes the provisioning Lambda reject the request.

How to fix it

Read the returned message

  1. Open the failed custom resource event in CloudFormation.
  2. Use the "Message returned" text to find the offending parameter.
  3. Correct the backend config and push again.

Inspect the Lambda logs

The custom resource Lambda writes its real stack trace to CloudWatch Logs; that is the authoritative cause when the returned message is generic.

Terminal
aws logs tail /aws/lambda/<custom-resource-fn> --since 30m

How to prevent it

  • Validate backend category parameters before pushing.
  • Keep amplify CLI and category templates current.
  • Test custom-resource-heavy categories (auth) in a sandbox first.

Frequently asked questions

What causes ""FAILED from custom resource""?
The backing Lambda hit an invalid configuration, a permission gap, or exceeded its timeout before sending SUCCESS, so CloudFormation treats it as FAILED.
How do I fix "FAILED from custom resource"?
Read the returned message

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card