Wood says AWS wanted to take that same philosophy to computing. “Lambda deals in functions. You provide function code and Lambda executes it on demand…. You cannot over provision, or under provision execution capacity in Lambda. It just is.”
In a traditional IaaS cloud environment customers provision virtual machines, storage, databases and all the security and management tools to go along with it. They load applications on to those VMs, and then they use tools like load balancers to scale them. They use management software to optimize their instance sizes and find virtual machines that have been left on by accident. Lambda and other FaaS platforms offer a different model. Code is written in functions. When an event happens that triggers that function Lambda runs it. That’s it. No capacity planning, no load balancing; just tasks being executed.
Wood, the AWS GM, says this is helpful in a variety of use cases. For example, Lambda functions can be written so that every time a photo is uploaded to S3, Lambda creates copies in different sizes, optimized for desktop, mobile and tablets. Or, every time an entry is uploaded into a database, a Lambda function can be written to load the data into a data warehouse like Amazon Redshift for analysis at a later time. Wood says many customers use Lambda to “glue” AWS services together and perform tasks of reporting, scheduling and altering data in preparation for analysis.
Another prime use case, Wood says, is in the Internet of Things world, where real-time responses are needed at large scales. AWS has recently introduced the ability to run Lambda functions on Internet of Things devices through its Greengrass platform, which can perform Lambda functions on devices in low-connectivity areas where no round-trip back to the cloud data center is needed. A security camera can run Lambda and every time motion is detected, to record the data and send it to a database. There is no virtual machine server sitting idly by 24 hours a day; the event-driven code just runs when it’s triggered to do so. AWS customer FireEye says it saved up to 80% off its VM pricing by using Lambda instead of its EC2 instances.
“Serverless is at its most simple an outsourcing solution. It allows you to pay someone to manage servers, databases and even application logic that you might otherwise manage yourself,” explains a deep-dive explainer on what serverless is on Martin Fowler’s blog. The big difference with serverless is that “you only pay for the compute that you need, down to a 100ms boundary.”
There is no waiting for servers to boot up, or load balancing to configure. Tasks are just infinitely executed. Fowler argues this model allows developers and companies to test ideas and bring them to market faster than other models.
Sign up for CIO Asia eNewsletters.