Why I am excited about AWS Lambda

For me, learning about AWS Lambda was the most exciting AWS re:Invent announcement in 2014. Lambda is the back-end compliment to the front-end AWS Javascript API SDK released a year ago. During the 2013 AWS re:Invent Werner Vogles said onstage the AWS JS API SDK was one of the more exciting announcements in 2013 because it made possible single page web apps to run directly on S3 (and DynamoDB, etc.) without the need for EC2. Lambda completes the big picture.

What is AWS Lambda?

AWS Lambda is a new cloud service from AWS that completely abstracts the infrastructure needed to run your code. It’s the further manifestation of “let someone else handle the undifferentiated heavy lifting”. You write your code (Javascript for now) and AWS Lambda runs it in a dedicated virtual language runtime. You do not have to think about provisioning, sizing & monitoring EC2 nodes. 7 years ago the introduction of EC2 was revolutionary because it abstracted application stacks from data center provisioning & operations, and now Lambda leaps forward to offer “infrastructure-less” environments (sure… there are servers running “somewhere,” its just you don’t have to think about them!)

You only pay for execution time. Right now $0.00001667 for every GB-second used and $0.20 per 1 million requests thereafter ($0.0000002 per request). In typical AWS fashion the pricing model is multi-dimensional. You pay for requests to run your Lambda function and duration. Duration is a price based on time and GB memory allocated. Memory allocations range from 128 MB to 1 GB.

Why is AWS Lambda so exciting?

Lambda is in essence a return to massive shared compute environments, but with a modern twist. I learned to program on a CDC Control Data mainframe and IBM System/36. Each of these environments supported the concept of multiple jobs running at the same time, with a “human” scheduler coordinating start, stop, error recovery, duration and resource allocation. As a student, I had to “schedule” my homework assignments with the CDC controller, which often meant late nights in the computer lab. AWS Lambda is all this, but via API and you get to be the controller.

AWS Lambda turns EC2, S3, SNS, DynamoDB & Kinesis (and soon all AWS services) into a collection of shared resources you harness to both trigger your application or be the recipient of your application’s computational output. A classic example is an image file is uploaded to S3 that needs to be resized. With Lambda, upon the POST, you can have S3 trigger Lambda to run your Javascript resize functions. The input is the original image upload and the output are the resized image objects, stored back to S3. The output can also be further triggers to other AWS services, like updating DynamoDB or sending an SNS alert.

Virtual machines leapfrogged bare hardware
EC2 leapfrogged virtual machines
Containers leapfrogged EC2
Lambda leapfrogs VM, EC2 and containers

Each progression was toward ever more efficient utilization of the underlying physical resource (i.e. a host computer.) At the end of the day all these virtual services consume physical resources (metal, electricity, real estate) and Lambda is the next step toward extreme efficiency on the backend.

What does AWS Lambda make possible?

Small front-end web developer teams can deliver a web or mobile app (world-wide scale) with no need for DevOps or infrastructure operations. Knit the application into the AWS cloud and scale directly across S3, DynamoDB with no regard for EC2 maintenance.

How about language runtimes as a service? Or “functions as a service?” A marketplace of your own and third-party functions available as a catalog of application building blocks.

Just like S3 and Ec2 kicked off a wave of innovation, AWS Lambda will do the same at another level of scale and efficiency.

What I would like to see

  • Lambda begs for new implementations of existing cloud pricing concepts.
  • The concept of Reserved Instances but for GB-second execution time. I want volume discounts if I commit to minimum execution minutes.
  • The concept of auction pricing and running jobs at off-peak demand times for a discount.
  • I want a marketplace to trade my minutes with another customer who needs execution time now.
  • I want a marketplace of third-party functions I can trigger from AWS events.

What are the challenges in Lambda world?

  • Understanding the Lambda security model and ensuring separation between my running Lambda functions and your Lambda functions is top notch.
  • Cost and health monitoring of thousands or millions of functions “firing” all the time based on app or environment triggers.
  • Visualize application schematic map of Lambda functions and their triggers to other AWS services.