-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the bug
When using the custom resources provider framework, if a user function is not accessed often enough (?), that function can go inactive and the provider framework function code does not appear to handle waiting for the state to change to Active.
Expected Behavior
The provider framework function should properly handle waiting/retrying while an Inactive user function transitions state to Active.
Current Behavior
The provider framework function does not appear to handle waiting/retrying invoking an Inactive user function. The provider function will throw an error similar to the following:
Received response status [FAILED] from custom resource. Message returned: CodeArtifactUserPendingException: INFO: Lambda is initializing your function. It will be ready to invoke shortly. at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27) at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:49:8) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9) at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12) (RequestId: <redacted>)
Reproduction Steps
This should be reproducible with any of the example custom resources in the custom_resources package.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.21.1 (build a6ee543)
Framework Version
No response
Node.js Version
v14.19.1
OS
Darwin Kernel Version 20.6.0: Tue Feb 22 21:10:41 PST 2022; root:xnu-7195.141.26~1/RELEASE_X86_64
Language
Typescript
Language Version
TypeScript (4.6.3)
Other information
No response