Functionality differences for AWS Lambda functions written in node js Java

0 votes

I am planning to use AWS Lambda for the backend of an app. I am more comfortable with Java compared to node.js but I see Lambda functions in node.js are more popular than Java. Are there any performance differences between Java based and nodejs based lambda functions?

Dec 3, 2018 in AWS by Datageek
• 140 points
909 views

1 answer to this question.

0 votes

Well, you can always choose Java, if you are comfortable with that. But please do keep in mind the following points.

While Java has a slower startup time, it's runtime performance is a lot better than the one of node.js or Python. That means Java Lambda functions make sense if:

  1. They are Invoked regularly - AWS Lambda will reuse it's initialized containers and you can benefit from the better performance without the cold start latency
  2. They have a long runtime - If your function is running e.g. for 1 or 2 minutes, you do not really care about 5 seconds of startup if the function itself is running an order of magnitude faster than node.js

Java projects are often a lot bigger than e.g. a node.js function. In any way you should always try to keep functions as small as possible to reduce the initial latency.

And of course performance shouldn't be the only factor when choosing your programming language. 

To know more about Node JS, It's recommended to join Node JS Course today.

answered Dec 3, 2018 by Archana
• 5,640 points

Related Questions In AWS

+3 votes
3 answers
0 votes
1 answer

JVM environment used in Java for AWS

openjdk 1.8. is provided by lambda for ...READ MORE

answered Jan 29, 2019 in AWS by sukanya
628 views
0 votes
1 answer

How to get information about differences for a commit specifier in a repository in AWS CodeCommit?

Hi@akhtar, You can get information about the differences ...READ MORE

answered Nov 24, 2020 in AWS by MD
• 95,460 points
950 views
0 votes
1 answer
0 votes
1 answer
+2 votes
3 answers
0 votes
1 answer

Set environment variables in AWS Lambda

You can specify environment variables for AWS ...READ MORE

answered Dec 31, 2018 in AWS by Archana
• 5,640 points
3,944 views
0 votes
1 answer

How to invoke the AWS lambda function from Java code

There are 2 methods in this class which should ...READ MORE

answered Feb 19, 2019 in AWS by Archana
• 5,640 points
6,022 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP