0

How to compile and run a c, c++, python, java code on aws lambda function. I am working on a project that user can upload their code and It will compile and run the code and return the output of the program to the user through aws lambda function. For compiling the codes I have to install the compilers in aws lambda function but I don't know how to do that. Is that possible to install in lambda function?

Thanks,

1 Answer 1

1

It isn't possible to install additional operating system dependencies like the gcc compiler. Additionally, even if you could I don't think you'd want to do that as it would dramatically increase the startup time of the Lambda. Remember that you may have thousands of Lamda's running and they may be re-initiated at any time.

A better way might be to have a Docker container that has all of the compilers available to your customers and deploy that to ECS. That way you could keep the isolation of Lambda but customize the runtime environment more.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.