Search code examples
aws-lambdaaws-cdk

How to migrate from @aws-cdk/aws-lambda-nodejs to aws cdk v2?


I see that @aws-cdk/aws-lambda-nodejs is outdated

AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2.

For more information on how to migrate, see the Migrating to AWS CDK v2 guide.

It was doing good job with packaging dependancies but what we do now to deploy lambda with dependancies? I can not find a good example.


Solution

  • CDK v2 is at feature parity with v1. See the migration guide on how to change the imports and packages.

    aws_lambda_nodejs is the v2 version of what you mention.