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:
- 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
- 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.