Code Snippet JS Missing AWS-SDK Module

When using the Chatflows, I created a new bot and am attempting to use the AWS SDK module that is said to be available in the documentation but I am getting an error saying the module doesn’t exist. I tested this on both node 18.x and 20.x.

Hi @KeganLester! Welcome to the Community-- happy to have you here :blush:

I want to invite some subject matter experts to see if they have any insight

Hey @Jnix284, @stefen, or @GiantFocal have y’all experienced this or do you have any troubleshooting suggestions?

I’m sorry @kennedyp, this is beyond my abilities with the API. Perhaps @MrJustinGivens has some insight or can point @KeganLester in the right direction with the node library for aws-sdk

Hey @KeganLester are you requiring the SDK outside of the exports.main?


const aws = require('aws-sdk');

Yes, I am. Does it need to be inside?

So I think the issue is the ENTIRE package is too large or something wrong with it installed in Lamdba (hubspot backend).

Here’s what I was able to get working, use specific clients within and using the @ symbol.

const awsDB = require(‘@aws-sdk/client-dynamodb’)