We’re trying to create an action that reads records from AWS DynamoDB. We’ve added the aws-sdk module to the action modules and we’re getting an error from const AWS = require(‘aws-sdk@2.2.30’);
{
"payload": {
"error": {
"code": "MODULE_NOT_FOUND",
"message": "Cannot find module 'aws-sdk@2.2.30'\nRequire stack:\n- /data/io/node12/89dc0f34-1b88-4526-b205-b48d15c5729d/webtask.js",
"name": "Error",
"stack": "Error: Cannot find module 'aws-sdk@2.2.30'\nRequire stack:\n- /data/io/node12/89dc0f34-1b88-4526-b205-b48d15c5729d/webtask.js\n at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)\n at Function.WebtaskModule._resolveFilename (/data/sandbox/lib/module.js:100:17)\n at WebtaskModule.require (/data/sandbox/lib/module.js:171:37)\n at require (/data/sandbox/lib/module.js:208:17)\n at module.exports (/data/io/node12/89dc0f34-1b88-4526-b205-b48d15c5729d/webtask.js:16:14)\n at /data/io/node12/89dc0f34-1b88-4526-b205-b48d15c5729d/webtask.js:119:17\n at processTicksAndRejections (internal/process/task_queues.js:97:5)"
},
"stats": {
"action_duration_ms": 26,
"boot_duration_ms": 1365,
"network_duration_ms": 11
}
}
}
It works fine from a rule just not from an action.