Is Node.Js right choice for Lambda?

Hi All,

Node.js is great for server side development as long as your business logic doesn’t need long running thread.

  1. Is this statement true for Lambda’s since we don’t manage servers?
  2. Does Amazon charge you for async non block i/o operations when single thread is not doing anything?

Not sure where you got this statement from - why would Node.js be any worse than any other language for long-running processes?

As for your other questions/points:

  1. Lambda has an execution time limit (currently 5 minutes, but likely to go up in the future), but it applies regardless of the language being used, so Node.js isn’t the issue.
  2. Yes, if your process is hanging around waiting for I/O you will be charged. The “right” way to do it is to make your workload more event-based, so that you don’t have a process (Lambda-based or otherwise) waiting for I/O e.g. fire an SNS Topic/Lambda Invoke to trigger a new, separate Lambda function when I/O is complete.
1 Like