# Upgrades

# Kumologica SDK Upgrade

Kumologica sdk upgrades are done using npm package manager and following command:

npm install -g @kumologica/sdk

To install specific version of kumologica sdk run following command:

npm install -g @kumologica/sdk@{version}

# Dependencies upgrade

Kumologica project dependencies including kumologica runtime are defined in package.json file. All upgrades of dependant packages should be done in this file using text editor.

# AWS SDK v2 to v3

Starting from version 3.5.0 both kumologica sdk and kumologica runtime are aws-sdk v3 native. All new projects created by versions 3.5.0 and above will be automatically setup with aws-sdk v3.

# AWS Lambda Node.js

AWS node.js 18 and later lambda runtime use aws-sdk v3. According to the AWS Documentation (opens new window), the deprecation schedule for the Node.js 16 runtime is as follows:

  • deprecation date: 12/06/2024
  • block function create: 28/02/2025
  • block function update: 31/03/2025

# AWS SDK Upgrade

AWS SDK v3 upgrade in initiated by kl open <project directory> command. Command checks the version of aws-sdk used by the project in package.json devDependencies. If aws-sdk v2 is detected, the user will be prompted to migrate to aws-sdk v3.

The migration process has following steps:

Version Check

The kl open command verifies the aws-sdk version in the project.json devDependencies.

Prompt for Migration

If aws-sdk v2 is found, the user is prompted to migrate to aws-sdk v3.

$ cd /Users/john/Projects/accounts-service
$ kl open .

This project uses the deprecated aws-sdk v2. Migration to aws-sdk v3 is available.

✔ Do you wish to migrate the project to aws-sdk v3? (y/N) · false

Function Nodes check

If the project contains function nodes using aws-sdk v2, the user is informed that these functions require manual migration to aws-sdk v3. The command then asks the user to confirm whether to continue with the migration or abandon it.

$ cd /Users/john/Projects/accounts-service
$ kl open .

This project uses the deprecated aws-sdk v2. Migration to aws-sdk v3 is available.

✔ Do you wish to migrate the project to aws-sdk v3? (y/N) · true

WARNING
This project contains function nodes that use aws-sdk v2. These functions can not be automatically migrated to aws-sdk v3.
Manual migration is required. For details, see: https://github.com/aws/aws-sdk-js-v3/blob/main/UPGRADING.md

✔ Do you wish to continue with the project migration to aws-sdk v3? (y/N) · false

# Manual conversion of function nodes

All instances of function nodes that use aws-sdk v2 must be converted to aws-sdk v3. Use links below (opens new window) for guidelines.

Note that v3 is modular rewrite of v2, all dependant aws-sdk v3 modules must be installed from project directory using npm install command.

For example to install cognito client, run command:

cd {your project directory}
npm install @aws-sdk/client-cognito-identity

# Further Reading

AWS Guide for upgrading to aws sdk v3: Upgrading Notes (2.x to 3.x) (opens new window)

AWS SDK JS v3 Documentation: AWS SDK for JavaScript v3 (opens new window)

AWS Developer Guide: Building Lambda functions with Node.js (opens new window)