This article is more than 1 year old
The Lambda that ROARED: Amazon unveils event-driven AWS compute service
Triggered code free devs from IT management woes
Amazon upped the ante for application development on Amazon Web Services (AWS) on Thursday, with the launch of a new service that lets developers write event-driven code without having to manage any infrastructure.
Dubbed AWS Lambda, the new offering allows developers to compose applications by writing functions that are triggered automatically by AWS platform events, such as modifications to objects in S3 storage buckets, updates to DynamoDB database tables, or events from Amazon's Kinesis data-processing service.
"You have to run no servers, no instances, nothing," Amazon CTO Werner Vogels said during his keynote at the AWS re:Invent conference in Las Vegas. "You just write the code and it will run for you."
So, for example, a developer could write a function that extracts metadata from image files and generates thumbnails for them, then set it to be triggered automatically every time a new image is uploaded to S3.
Previously, doing so would have required spinning up one or more EC2 instances, complete with full application stacks. With AWS Lambda, the same can be achieved with just a few lines of code, with Amazon taking care of the gritty details of provisioning, scaling, and maintenance.
Amazon CTO Werner Vogels talked up AWS Lambda at this years AWS re:Invent
Because Lambda functions are stateless and don't maintain any data of their own, AWS Lambda can automatically launch as many instances of a function as are necessary to process the number of incoming events, and then just as easily dispose of them.
Lambda functions typically respond to triggers within milliseconds, Vogels said, and Amazon's infrastructure will support running thousands of instances of a single function in parallel, scaling across multiple AWS Availability Zones if necessary.
Amazon foresees countless applications for the tech, ranging from automatic data replication and synchronization, to scheduled events, to responding to messages from internet-enabled devices like thermostats and smart appliances.
During a panel session at AWS re:Invent, AWS technical adviser Khawaja Shams said developers could even use Lambda functions as a way to build ecosystems around their applications, by allowing third parties to contribute functions that trigger other services.
"The message here is the composability," Shams said. "It's the ability for multiple people to work together and continuously add functionality in the form of a crowd sourced startup, where you can continuously keep adding capabilities without having to worry about operations and so forth."
Amazon has priced the service based on the number of Lambda function requests served and the compute time needed to run the code. The basic formula is that customers pay $0.20 per 1 million requests, plus $0.00001667 per GB-second of compute time used, although the first million requests per month are free. There's also a "free tier" that includes 1 million requests per month and 400,000GB-seconds of compute. Calculating exact pricing can get tricky – Amazon has a few example cases here.
For now, however, Amazon is only offering AWS Lambda as a preview, and there is a waiting list. You can sign up here, and Amazon says it will let you know when a slot is available. ®