21 ms·
Now, if I can also link the MySQL C++ connector libraries, I could run some of my code "natively" in Lambda. I have used C++ in Lambda before, it is quite cumb
by Shorel 8y ago
Now, if I can also link the MySQL C++ connector libraries, I could run some of my code "natively" in Lambda.
I have used C++ in Lambda before, it is quite cumbersome and it still has the performance hit of using Node.JS.
- k__ 8y agoRust was kinda nice even before this, but cutting out the Go or Nodejs indirection certainly helps.
- marcomagdy 8y agoYou certainly can link MySQL connector libraries. Or any library for that matter that you normally link in a C++ application. The lambda-cpp-runtime does not limit you. Check out some of the examples in the GitHub repository.
- Shorel 8y agoChecking the examples is the first thing I did. No example uses MySQL connector. There are only example CMake calls to find_library, that will or will not find this library based on things that are not documented. AWS Lambda still uses Amazon Linux AMI as the base for running all code. MySQL C++ connector library is not available to be easily installed by yum for this particular OS. In particular, the library is distributed as an RPM, from Oracle website, which requires you to be logged in to download it, and then manually installed. Also, an appropriate CMake find script has to be available to CMake. Therefore, this is still a valid question, and AWS support needs to clarify. For the previous Lambda version, I had to add the mysqlcppconn.so file to the uploaded zip and use something like this to ensure the executable runs: "/lib64/ld-linux-x86-64.so.2 --library-path "+process.cwd() +"/node_modules/.bin/lib "+process.cwd() +"/node_modules/.bin/helloworld "