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.
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
- Open the failed custom resource event in CloudFormation.
- Use the "Message returned" text to find the offending parameter.
- 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.
aws logs tail /aws/lambda/<custom-resource-fn> --since 30mHow 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.