I am trying to access a file on S3.
This is a POC - the idea is to build the code in JavaScipt, deploy it on AIO and run it.
The code uses aws-sdk module and works just fine when running it on my local terminal (using command node <filename>.js). I can even deploy the code onto AIO, by creating an action.
However, the issue is I am unable to run the code. I am met with this error while trying invoke the action:
I have created a templated Firefly project on developer console, configured CLI, workspace etc. as mentioned in the documentation; even installed aws-sdk package in the project directory and added the dependencies in package.json file as well. I continue to face the same error.
If anyone has figured out how to get this to work, please do provide a code sample or let me know where I might be going wrong.
You need to follow same procedure has followed in this example.
Those node_modules won't be there by default so you need to create headless app and do npm install aws-sdk in those app project folder. Do some changes in index.js which will be in action folder and do app deploy. After that you will get web-based action url and use it accordingly.
In case you find the answer of Naveen TLDR here is a short version:
add `aws-sdk` in your `package.json` as dependency and do a `npm install`. Should solve the problem