Skip to content

Fix/update lambda logger dependency to be compatible with Node.js 24#1238

Merged
isabeleliassen merged 1 commit intocsg-org:mainfrom
InspiringApps:fix/update-aws-logger-dependency
Dec 29, 2025
Merged

Fix/update lambda logger dependency to be compatible with Node.js 24#1238
isabeleliassen merged 1 commit intocsg-org:mainfrom
InspiringApps:fix/update-aws-logger-dependency

Conversation

@landonshumway-ia
Copy link
Collaborator

@landonshumway-ia landonshumway-ia commented Dec 26, 2025

While smoke testing a new feature, it was discovered that the lambda responsible for sending out Cognito emails was no longer functioning as a result of the recent update to the Node.js 24 runtime with the following error message:

[UserLambdaValidationException] Errors were encountered during user creation. Please review the errors and retry.

message: CustomMessage failed with error ERROR: AWS Lambda has removed support for callback-based function handlers starting with Node.js 24. You need to modify this function to use a supported handler signature to use Node.js 24 or later. For more information see https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html..

Although we confirmed that the lambda handler definition was using the proper async/await syntax, further investigation showed that the lambda is wrapped with a powertools logger decorator which was altering the way the function was called which was incompatible with the Node.js runtime upgrade. The solution was to upgrade the lambda powertools logger dependency to the latest version.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated internal logging dependency to a newer version.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

📝 Walkthrough

Walkthrough

A dependency version bump for @aws-lambda-powertools/logger from ^2.10.0 to ^2.30.0 in the Node.js Lambda package manifest. No code changes accompany this update.

Changes

Cohort / File(s) Summary
Dependency version update
backend/compact-connect/lambdas/nodejs/package.json
Bumped @aws-lambda-powertools/logger from ^2.10.0 to ^2.30.0

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through code so neat,
Where loggers now have finer feet!
From 2.10 to 2.30 we climb,
Each minor version, marking time! 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides detailed context about the issue, root cause, and solution, but doesn't follow the repository's template structure with defined sections. Consider restructuring the description to follow the template format with Requirements, Description, and Testing sections, and include a closing issue reference.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating the lambda logger dependency for Node.js 24 compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4058377 and 33a4b29.

⛔ Files ignored due to path filters (1)
  • backend/compact-connect/lambdas/nodejs/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • backend/compact-connect/lambdas/nodejs/package.json
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 848
File: backend/compact-connect/lambdas/python/provider-data-v1/handlers/registration.py:111-117
Timestamp: 2025-06-17T19:05:36.255Z
Learning: In CompactConnect PR #848, the user landonshumway-ia decided to leave timezone handling code in _should_allow_reregistration function as-is after testing in sandbox environment confirmed it works correctly. The user's reasoning was that reregistration is an edge case, the code has been tested and verified, and AWS is unlikely to change behavior that would break many clients. This represents a pragmatic engineering decision based on testing and risk assessment.
Learnt from: jusdino
Repo: csg-org/CompactConnect PR: 1218
File: backend/compact-connect-ui-app/stacks/frontend_deployment_stack/distribution.py:127-127
Timestamp: 2025-11-21T01:00:00.678Z
Learning: As of November 2025, AWS Lambda and LambdaEdge support Node.js 24.x runtime (Runtime.NODEJS_24_X in AWS CDK), even though official documentation may not be fully updated yet.
📚 Learning: 2025-08-22T21:20:35.260Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 1029
File: backend/compact-connect/docs/api-specification/latest-oas30.json:468-471
Timestamp: 2025-08-22T21:20:35.260Z
Learning: The file backend/compact-connect/docs/api-specification/latest-oas30.json is auto-generated by API Gateway and should not be modified inline. Any schema changes would need to be addressed at the source in the CDK/CloudFormation definitions.

Applied to files:

  • backend/compact-connect/lambdas/nodejs/package.json
📚 Learning: 2025-07-21T20:40:56.491Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 907
File: backend/compact-connect/lambdas/python/common/requirements.txt:7-0
Timestamp: 2025-07-21T20:40:56.491Z
Learning: In CompactConnect, there is only one lambda layer in use for Python lambdas, and this single layer manages the versions of aws-lambda-powertools, boto3, and botocore dependencies. This eliminates concerns about version skew across multiple lambda layers since all Python lambdas share the same dependency management through this single layer.

Applied to files:

  • backend/compact-connect/lambdas/nodejs/package.json
📚 Learning: 2025-08-12T19:49:48.235Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 1001
File: backend/compact-connect/lambdas/python/disaster-recovery/requirements.txt:1-6
Timestamp: 2025-08-12T19:49:48.235Z
Learning: The disaster-recovery Lambda functions in CompactConnect get their aws-lambda-powertools dependency from the shared lambda layer rather than individual requirements.txt files, which is why their requirements.txt files can be empty or header-only.

Applied to files:

  • backend/compact-connect/lambdas/nodejs/package.json
📚 Learning: 2025-08-12T19:49:24.999Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 1001
File: backend/compact-connect/lambdas/python/disaster-recovery/requirements.in:1-1
Timestamp: 2025-08-12T19:49:24.999Z
Learning: In CompactConnect disaster-recovery Lambda functions, runtime dependencies like boto3, aws-lambda-powertools, and botocore are provided by lambda layers at deploy time rather than being specified in requirements.in files. The requirements.in file intentionally contains only a comment explaining this approach.

Applied to files:

  • backend/compact-connect/lambdas/nodejs/package.json
📚 Learning: 2025-11-21T01:00:00.678Z
Learnt from: jusdino
Repo: csg-org/CompactConnect PR: 1218
File: backend/compact-connect-ui-app/stacks/frontend_deployment_stack/distribution.py:127-127
Timestamp: 2025-11-21T01:00:00.678Z
Learning: As of November 2025, AWS Lambda and LambdaEdge support Node.js 24.x runtime (Runtime.NODEJS_24_X in AWS CDK), even though official documentation may not be fully updated yet.

Applied to files:

  • backend/compact-connect/lambdas/nodejs/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: TestApp
🔇 Additional comments (1)
backend/compact-connect/lambdas/nodejs/package.json (1)

43-43: Version 2.30.0 is confirmed for Node.js 24 compatibility.

The @aws-lambda-powertools/logger v2.30.0 supports AWS Lambda Node.js 24 runtime and contains no breaking changes from v2.10.0—only bug fixes and documentation updates. The version bump is appropriate for addressing the Node.js 24 compatibility objective.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@landonshumway-ia
Copy link
Collaborator Author

@jlkravitz This is ready for your review. We wlll want to get this merged into main before we release any future deployments to the prod environment, otherwise the system will not be able to create any new user accounts for both staff and providers.

Copy link
Collaborator

@jlkravitz jlkravitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@isabeleliassen isabeleliassen merged commit d80b3e5 into csg-org:main Dec 29, 2025
2 of 6 checks passed
@landonshumway-ia landonshumway-ia deleted the fix/update-aws-logger-dependency branch December 29, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants