Different languages for custom functions?

What’s your idea?

AWS Lambda supports more languages than just Node - it also supports Python, Go, PowerShell, C#, Java, and Ruby.
How much effort would it take on your end to deploy functions in these other languages?

What problem might it solve?

Increases potential user-base of backend developers from only Node devs (which is still a lot) to basically everyone

Hey @samwoolertonLW! We’ve been chatting about this one for a bit now. It’s something that we’ll get around to, though don’t have it in scope yet.

Could you give me a solid example of what you’re trying to accomplish that demands using other languages? More fuel for the roadmap fire :slight_smile: :fire:

Doesn’t affect me personally, as I’d probably stick to Node even if you offered others - just think it’s an interesting idea to attract other backend devs

Thanks man. Yeah, I totally agree. One day soon, god willing :slight_smile:

1 Like

Would something like this work? It seems to work great locally when running my mock request.

 const runScript = () => {
    return spawn('python', ['python/script1.py']);
  };

  const promise = new Promise((resolve, reject) => {
    const subprocess = runScript();

    subprocess.stdout.on('data', (data) => {
      console.log(`PYTHON DATA: ${data}`);
    });

    subprocess.stderr.on('data', (data) => {
      console.log(`PYTHON ERROR: ${data}`);
    });

    subprocess.on('close', (code) => {
      if (code !== 0) {
        reject(code);
      } else {
        resolve(code);
      }
    });
  });

  await promise;

I get an error when running in a trigger

ERROR Uncaught Exception {"errorType":"Error","errorMessage":"spawn python ENOENT","code":"ENOENT","errno":"ENOENT","syscall":"spawn python","path":"python","spawnargs":["python/script1.py"],"stack":["Error: spawn python ENOENT"," at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)"," at onErrorNT (internal/child_process.js:415:16)"," at process._tickCallback (internal/process/next_tick.js:63:19)"]}

Super cool idea! Not sure it will work though… @evgeny.semushin