问题
I haven't tried it yet, but I know you can supposedly run AWS Lambda functions in Java and reference C++ libraries from them. How do you compile the C++?
回答1:
I was struggling to do exactly what you ask only a few days ago when I've stumbled upon this article: http://www.glfrc.com/2018/01/19/aws-lambda-with-java-and-native-code/
You basically have 2 options:
- on an Amazon Linux EC2 machine.
- on any machine running docker by using the Amazon Linux docker image.
The article explains the second procedure, which is the one I've gone for as well. The first one should be similar. You start an EC2, install the same packages, upload your code and compile.
来源:https://stackoverflow.com/questions/48722922/how-to-compile-c-library-to-be-used-in-aws-lambda