Imagination time: Imagine for a moment that you have an app, it has one button and one little window. When you click the button it changes the text...
When should you use AWS Lambda?
Faster than the wing flap of a bee Bees flap their wings ridiculously fast, at around 230 beats per second (fruit flies are 80 times smaller than honeybees but flap their wings only 200 t
Faster than the wing flap of a bee
Bees flap their wings ridiculously fast, at around 230 beats per second (fruit flies are 80 times smaller than honeybees but flap their wings only 200 times a second.) Given that there are 1,000 milliseconds in a second, a bee wing flap takes ~4.3 milliseconds per wing flap. That's really, really fast. Why am I talking about bees? It's a frame of reference.
From years to milliseconds
Prior to AWS and the Cloud, way back in 2006, if you wanted to host a website or an application, you would have to buy a computer called a server or rent space from a hosting company. Generally, buying the server meant you would amortize the cost over multiple years, and hosting contracts were usually a year or more. If you only needed a website for a month, you had to figure out how to make the costs work.
When AWS came out, you could rent a server for a month or even a few hours. No long term contracts, no strings attached. Then in 2014 when AWS launched a new service called AWS Lambda, you could buy server time in 100 milliseconds increments — or 23 bee wing flaps at a time. This may not seem like a big deal, but it is.
From $3.3M to $5.5K per month
As a thought exercise, imagine you write a program to check the stock price of Amazon (AMZN) once every second. The old way of operating servers meant you'd rent a machine and pay for 100% of the time — let's say that costs you $1,000 per month. If instead you ran that same software on Lambda, you would only pay for that moment that you are running the program: the 100 ms once every minute — and not paying for the other 59.9 seconds. Keeping things simple, that would drop your cost to $1.67 per month. Imagine for a moment that you had a program that checked all 3,300 stocks listed on the NASDAQ, and you start to get a sense of the scale. Instead of paying $3.3M per month, you might pay $5,500.
Not fast enough
For the engineers at AWS, being able to buy server time at 100 ms wasn't fast enough. One of the many things announced by AWS CEO, Andy Jassy, during his keynote speech was the move to bill in 1 millisecond increments. Instead of 23 wing flaps, we are talking less than 1/4 of the time it takes a bee to flap its wing.
From $3.3M to $55 per month
Returning to our thought exercise, that means the monthly cost to run our stock monitoring program just dropped from $5,500 to $55 per month. This is game changing, and the implications of the changes are just barely beginning to be felt.
You might be surprised to learn that by far, not only is most of the world's software not designed to take advantage of the Cloud, but much of it is still being built the old fashioned way. This means products are being launched with cost structures that cost millions and trying to compete with products that cost dozens of dollars — and this is just one single dimension. These contests will not even be close, and it's imperative that technologists and business decision makers embrace the power of the Cloud before it leaves them behind.