Open saurabhmarwaha opened 8 months ago
Hello @saurabhmarwaha and anyone else reading here 👋
Since Artillery 2.0.14, we've changed the way Lambda works. You shouldn't run into these issues anymore. Can you please upgrade and see if you still run into any issues? Thank you!
Issue: Cannot find module run-fargate.js on a Multiple Scenario specs. Note: If I keep the config and scenario in one file, it works.
Am I giving a wrong execution command? Followed: https://github.com/artilleryio/artillery/tree/main/examples/multiple-scenario-specs
Summary: Trying to execute simple script that hits http endpoint which executes perfectly fine locally, but when I try to scale using AWS Lambda, I am getting an issue 'module not found' (run-fargate.js).However, not sure why it's looking for run-fargate module when ideally it should call run-lambda.js which is also in lib/cmds folder.
Also, notice that it doesn't bundle
Version info:
Running this command:
Error:
[MODULE_NOT_FOUND] ModuleLoadError Plugin: artillery: [MODULE_NOT_FOUND] require failed to load /var/task/node_modules/artillery/lib/cmds/run-fargate.js: Cannot find module 'rc'\n"
Terminal:
Powershell with Set-ExecutionPolicy RemoteSigned Also tried on bash terminal
Execution
Test run id: tqy53_6qhqhn9j4eq5ertgbhezegb5zd57x_hyem NOTE: AWS Lambda support is experimental. Not all Artillery features work yet. For details please see https://docs.art/aws-lambda
λ Creating AWS Lambda function...
'Require stack:\n' + '- /var/task/node_modules/artillery/lib/platform/aws-ecs/legacy/run-cluster.js\n' + '- /var/task/node_modules/artillery/lib/cmds/run-fargate.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/module-loader.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/util.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/formatter.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/command.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/index.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/flags.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/cli-ux/styled/table.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/cli-ux/styled/index.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/cli-ux/index.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/command.js\n' + '- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/index.js\n' + '- /var/task/node_modules/artillery/bin/run\n' + 'module: @oclif/core@2.15.0\n' + 'task: toCached\n' + 'plugin: artillery\n' + 'root: /var/task/node_modules/artillery\n' + 'See more details with DEBUG=*\n' + '(Use
node --trace-warnings ...
to show where the warning was created)\n' + ' Error: ENOENT: no such file or directory, open \n' + " 'scenarios\backend-endpoint-matrix.yml'\n" + ' Code: ENOENT\n' + "[Error: ENOENT: no such file or directory, mkdir '/home/sbx_user1051'] {\n" + ' errno: -2,\n' + " code: 'ENOENT',\n" + " syscall: 'mkdir',\n" + " path: '/home/sbx_user1051'\n" + '}\n' } Summary report @ 20:29:31(-0400) No measurements recorded during this periodEstimated AWS Lambda cost for this test: $0.001
Files being used:
Package.json attached.
package.json
Node_modules installed. See SS
Cloudwatch Logs
2024-03-21T06:23:32.382Z 9b0dee15-735e-41f5-9a72-eefd4a4672ae ERROR (node:24) [MODULE_NOT_FOUND] ModuleLoadError Plugin: artillery: [MODULE_NOT_FOUND] require failed to load /var/task/node_modules/artillery/lib/cmds/run-fargate.js: Cannot find module 'rc' Require stack:
node --trace-warnings ...
to show where the warning was created)