When should you use AWS Lambda?
This article first appeared in the Metal Toad newsletter. Subscribe to our weekly newsletter here to stay up-to-date on the latest cloud insights for the Media & Entertainment industry from Metal Toad.
The AWS re:Invent conference in 2020 spilled over from December into January. Originally planned for 3 weeks as a free, 100% virtual event, it ended up flowing into mid-January with more content than you could fit into a 3-week 24 hour cycle. If you want to be sure not to miss anything, you can catch our full list of AWS re:Invent 2020 announcements but I've been searching for one that captures the heart of how important AWS Cloud is to our future, and I think I've found it.
AWS CEO Andy Jassy Speaking at re:Invent 2020
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.
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.
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.
Note: This article first appeared in the weekly Metal Toad newsletter. If you find this article helpful and think someone in your life would benefit from it, please consider forwarding it to them and asking them to sign up to receive it themselves.