GithubHelp home page GithubHelp logo

Comments (6)

desoss avatar desoss commented on July 18, 2024 1

I've inspected the code you wrote and I've solved the problem described above.
There are no write permissions needed. So no custom file system is needed for the AWS Lambda function.

The problem that I had was related to the fact that I was bundling my Lambda function, compiling it into a single file.
Simply excluding all the Mida dependencies from the produced bundle did the job!

As a suggestion, I would raise an exception in the load() function that you wrote if the .proto files are not correctly loaded.

from mida.

Vasile-Peste avatar Vasile-Peste commented on July 18, 2024

Hello, when using Mida with cTrader, a socket connection is created under the hood to use cTrader's Open API. The messages exchanged between Mida and cTrader are structured with protobuff. The protobuff schemas are loaded from the file system automatically, this error occurs when the protobuff reader was unable to load the .proto files from the file system.

I don't know how AWS Lambda works, but most probably you don't have access to file system and/or you are unable to read this files: https://github.com/Reiryoku-Technologies/cTrader-Layer/tree/master/protobuf
This library is used under the hood by the Mida cTrader plugin

I think you should investigate more about the file system, let me know here, thank you!

from mida.

desoss avatar desoss commented on July 18, 2024

Hey @Vasile-Peste, thanks for your answer.
It makes totally sense.

Mounting a custom file system for the AWS Lambda it's possible.
Nevertheless, it would cost slightly more and it'll slow down the code execution because also a VPC has to be configured.

Notice that, it's possible to read/write from a local disk in a Lambda function without a custom file system, but writing is limited to the /tmp directory.

Would it be possible to make configurable the root directory in which the .proto files are stored?

from mida.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.