Amazon Web Services (AWS) used its re:Invent conference this month to announce AWS Lambda, a compute service that runs developers' code in response to events and automatically manages compute resources. The concept is that this will make it easier to build and manage applications that respond quickly to new information.
AWS Lambda starts running code within milliseconds of an "event" (such as an image upload, in-app activity, a website click, or output from a connected device), so developers can also use it to create new back-end services where compute resources are automatically triggered based on custom requests. Essentially, it sounds like a more efficient way of the application itself functioning, when based in a cloud environment of course.
Developers pay only for the requests served and compute time required to run their code. AWS Lambda charges for compute time in increments of 100 milliseconds.
The company says that it sees many use cases where applications need compute cycles in order to take action on a change in the application's data, such as (and these are all examples from inside the Amazon stable) a new image upload into Amazon Simple Storage Service (S3), updated data in Amazon DynamoDB, or a real-time stream from Amazon Kinesis.
AWS VP Marco Argenti explains as follows, "Responding to these changes requires customers to manage significant compute fleets — usually across availability zones — and manage, configure, and scale these resources. AWS Lambda provides a high-performance computational platform that runs functions in code in response to changes in data, without the need to provision or manage a single virtual server. Customers write simple JavaScript code to take action on an event and upload it to AWS Lambda. Within milliseconds of a change in data, AWS Lambda responds by spinning up the appropriate compute resources to perform the action. It automatically scales to millions of requests, spreading across multiple Availability Zones if needed."
AWS Lambda works with any third-party library, including native ones, so developers don't have to learn any new languages, tools, or frameworks. Developers can edit functions directly within AWS Lambda, which means they can instantly update an application without having to compile edits, build changes, and then redeploy the application.