Closed nikhil-git closed 5 months ago
Hi @nikhil-git,
Thanks for reporting the issue! Which Artillery version and OS are you using? I am unable to replicate this with Artillery v2.0.0-36
.
A couple of questions:
nifty_100_202308281514.csv
CSV file in the same directory as the test script?Thank you!
Note: For the future, you may want to read this guide from Github on creating and highlighting code blocks. Following this helps us to spot any possible formatting errors in your configs if you use code blocks, which helps with debugging.
Hello @saurabhmarwaha and anyone else reading here 👋
Since Artillery 2.0.14, Lambda Container Images are the default and this type of error should no longer happen.
If you still run into another issue, please open another issue with it and we'll take a look!
Hi,
I am trying to execute my script over AWS lambda. The script is as below: config: target: 'https://cash-apis.venturasecurities.com' payload: path: "nifty_100_202308281514.csv" fields:
scenarios:
flow:
loop:
over: tokens
Here I have given config.payload that picks up values from a csv file. Now on my local, it works perfectly fine . However , while running it on AWS lambda , it gives below error: 2023-08-28T15:21:00.031Z f1aaf645-e89d-4978-a035-062a7acc1e45 INFO Error: ENOENT: no such file or directory, open '/var/task/nifty_100_202308281514.csv' at Object.openSync (node:fs:590:3) at Object.readFileSync (node:fs:458:35) at readPayload (/var/task/node_modules/artillery/lib/cmds/run.js:486:21) at prepareTestExecutionPlan (/var/task/node_modules/artillery/lib/cmds/run.js:465:25) at async Function.RunCommand.runCommandImplementation (/var/task/node_modules/artillery/lib/cmds/run.js:196:20) at async RunCommand.run (/var/task/node_modules/artillery/lib/cmds/run.js:49:5) at async RunCommand._run (/var/task/node_modules/artillery/node_modules/@oclif/command/lib/command.js:43:20) at async Config.runCommand (/var/task/node_modules/artillery/node_modules/@oclif/config/lib/config.js:173:24) at async Main.run (/var/task/node_modules/artillery/node_modules/@oclif/command/lib/main.js:28:9) at async Main._run (/var/task/node_modules/artillery/node_modules/@oclif/command/lib/command.js:43:20)
I am quite sure that it has to do with the path where the csv file is being fetched while running it on lambda. Request you to kindly help me in setting this path correctly so as to successfully able to execute the script.
Thanks, Nikhil