Richard Bucker

The normalized cost of Amazon Lambda

Posted at — Nov 14, 2014

Amazon announced a new AWS feature called Lambda. I watched the presentation with great interest, however, I did not make it all the way through… even at 7min it was too long. The idea is simple. Some event that your code is configured to watch occurs. When it occurs your code starts running until it finishes running and then stops.This is an amazing bit of architecture, design or implementation. Whatever you want to call it. In many respects it borrows from flow based programming¬†without actually saying it.Pricing - there are three factors that contribute to the overall cost. [1] the number of requests, [2] the running time of the function, [3] the amount of memory you opted for when configuring your function. I assume that amazon is normalizing the CPU over the function in order to calculate some sort of compute index.¬†If I were to run my function non-stop for the span of the month then the cost would be just under 6 dollars. (2.6e9 / 100 * 0.000000208) and if you get the upper bounds of memory - 1M - then you’re looking at $43… if you run you app non-stop… 24x7.When I compare the cost of Lambda I get a little apprehensive. [a] there is vendor lock in [b] it’s possible for a runaway … but more importantly while I’m impressed with the scale to which this is possible, being optimistic is one thing, but what are the chances that your business is going to scale that fast? Where is the FUD that is going to follow the recruiting process; and so on. The ripple effect. On the other hand, building generic solutions in javascript that could flip flop into or out of the lambda framework might make a better sweet spot. (see appscale)