-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
triggers: Trigger and TriggerFunction resource fail on subsequent deployments. maybe incorrect serialization of timeout? #30861
Comments
Now looking at it, the timeout thing seems to be a red herring. It is a parameter to the Trigger Custom Resource handler and looking at the mangled code for it (because i can't find it elsewhere) parses it to an integer: I really can't tell what's causing CloudFormation to output that error. |
Founds the logs:
|
Resource re-creation also does not seem to work. But roll-back seems to work fine. Also, deletion worked. |
Well, this was completely my fault. An API Call to |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
The Trigger custom resource in CDK causes a CloudFormation error when trying to deploy. This seems to be because we're using a String value for a Number field but the error is not clear on which fields.
CloudFormation error on the
PostDeploymentHandlerTrigger7245B54D
Trigger resource with CREATE_FAILED:Looking at the template JSON file:
When compared to other resources like:
Seems to be because of
toString
usage here:aws-cdk/packages/aws-cdk-lib/triggers/lib/trigger.ts
Line 131 in ce7a8d5
It's also strange because the first time the deployment ran successfully.
Expected Behavior
Template file contains number for timeout instead of string. Deployment succeeds. Function is triggered.
Current Behavior
Deployment failed with CloudFormation Error:
Reproduction Steps
Possible Solution
Potentially, if the timeout field is the issue, fix it such that it's synthesized with a number instead of a string for the timeout field.
Additional Information/Context
No response
CDK CLI Version
2.149.0 (build c8e5924)
Framework Version
2.149.0
Node.js Version
20
OS
MacOS Sonoma 14.5 (23F79)
Language
TypeScript
Language Version
5.0.4
Other information
No response
The text was updated successfully, but these errors were encountered: