We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serviceTimeout
The CustomResource construct takes a serviceTimeout prop. The construct has some validation logic for the value if it isn't a token:
CustomResource
aws-cdk/packages/aws-cdk-lib/core/lib/custom-resource.ts
Line 148 in bc96ee1
But I was not able to pass a token for serviceTimeout. I have the following unit test:
test('set serviceTimeout', () => { // GIVEN const stack = new Stack(); const durToken = new CfnParameter(stack, 'MyParameter', { type: 'Number', default: 60, }); // WHEN new CustomResource(stack, 'MyCustomResource', { serviceToken: 'MyServiceToken', serviceTimeout: durToken as any, }); });
It fails with following error:
props.serviceTimeout?.toSeconds is not a function TypeError: props.serviceTimeout?.toSeconds is not a function
I also tried the following test:
test('set serviceTimeout', () => { // GIVEN const stack = new Stack(); const durToken = new CfnParameter(stack, 'MyParameter', { type: 'Number', default: 60, }); // WHEN new CustomResource(stack, 'MyCustomResource', { serviceToken: 'MyServiceToken', serviceTimeout: Duration.seconds(durToken.valueAsNumber), }); });
Error: serviceTimeout must either be between 1 and 3600 seconds, got -1.8881545897087526e+289
No response
It should take a token as the value.
Using token would cause error. See above.
See above
2.179.0
20
Mac
TypeScript
The text was updated successfully, but these errors were encountered:
bc91c70
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.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
The
CustomResource
construct takes aserviceTimeout
prop. The construct has some validation logic for the value if it isn't a token:aws-cdk/packages/aws-cdk-lib/core/lib/custom-resource.ts
Line 148 in bc96ee1
But I was not able to pass a token for
serviceTimeout
. I have the following unit test:It fails with following error:
I also tried the following test:
It fails with following error:
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
It should take a token as the value.
Current Behavior
Using token would cause error. See above.
Reproduction Steps
See above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.179.0
Framework Version
No response
Node.js Version
20
OS
Mac
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: