Fix: update nodejs version to 22.x for custom resource lambdas #100
+76
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates the default runtime version to
nodejs22.xfor custom resource backing lambda functions in case provider runtime is NOT nodejsIt addresses the issue that was brought up here #57 (comment)
Impact
Verification
Every lambda function successfully executed during the deployment process

and CF stack got deployed successfully.
There is one caveat to the above ITs. It looks like some ITs are flaky because of potential bugs in the code(?)
They are not affected by the change above they are failing for a different reason as they do not fallback to default nodejs version.
e.g
api-gateway.test.jsCW role custom resource handler tries to attach policies
iam.send(new ListAttachedRolePoliciesCommand({ RoleName: roleName }))).AttachedPoliciesand if the role doesn't exist (it wasn't supplied to the provider as roleArn) error happens and it tries to fallback to creating a role but it looks like the condition is wrongif (error.code === 'NoSuchEntity')according to the docs https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-iam/Class/NoSuchEntityException/ there is no such field available as code. And the handler just throws an error and the test fails.If condition is adjusted then test successfully passes.