3
votes

Asynch programming helps to increase the number of requests a server can handle simultaneously but not necessarily the time to produce the response.

Since AWS cost depends only on the number of requests and on the execution time, does it make sense to use asynch programming?

In my case, I have a java lambda that needs to call a single http server. No more than that.

I could either use an http synch or asynch library. The synch code is more readable. I understand the asynch code is generally better in case of concurrency but probably this not in case of AWS lambda.

1

1 Answers

-2
votes

What async has to do with AWS Lambda? I think you are mixing up things here. You can invoke AWS Lambda both in synch and asynch way (If AWS resources, there are few limitations on which type of invocation they can do) . AWS Lambda are really for state-less, short running, scale-able (concurrently) computing requests. How invoke them depends on your need.