multiply the speed of compute-intensive Lambda functions without (much) increase in cost
Given:
-
AWS Lambda duration charges are proportional to the requested memory.
-
The CPU power, network, and disk are proportional to the requested memory.
One could conclude that the charges are proportional to the CPU power available to the Lambda function. If the function completion time is inversely proportional to the CPU power allocated (not entirely true), then the cost remains roughly fixed as you dial up power to make it faster.
If your Lambda function is primarily CPU bound and takes at least several hundred ms to execute, then you may find that you can simply allocate more CPU by allocating more memory, and get the same functionality completed in a shorter time period for about the same cost.