­
Lock logo 70px
ExpeditedSSL - Fastest+Easiest AWS SSL


Aws AWS Lambda in
Plain English


AWS Lambda service should have been called AWS Scripts.


WHAT DOES LAMBDA DO?

Lambda runs your code (currently Java, Node or Python). Things that you’d typically do with a server (or EC2) can instead be broken down into small chunks.

It’s like if you asked AWS to make you a custom computer whose one and only purpose was to execute your code block.

Flowcharts are commonly used to represent the entirety of a web application. Lambda’s would be the processing blocks within the larger program.

Aws s3 lambda flowchart

Amazon refers to each set of code, supporting libraries (like ImageMagick) and config files as a “Lambda function.” This is deeply confusing as “Lambda” and “function” are both used so often in so many ways in different programming languages.

In your overall application you might have several Lambda functions each of which does a discrete task. You could imagine an image processing application that takes each photo pushed into it and a series of Lambda functions on it.

  • Lambda Function #1 : resize the image
  • Lambda Function #2 : detect faces in image
  • Lambda Function #3 : detect if Monica Tribbler who stole my milk in 3rd grade is in the photo.

THE CONCEPT OF LAMBDA

In many ways Lambda is an executable version of the Unix Philosophy where you strive to make short, simple, clear, modular, and extensible scripts that you tie together into a larger system.


WHAT MAKES IT SO AWESOME?

Very Efficient

In the physical world, it’s immediately obvious when things are inefficient.

In the world of web services the inefficiencies aren’t always so clear, but at the core of things Lambda is an Amazon service that seeks to create a computing system that perfectly fits what you’re trying to accomplish.

Aws s3 lambda truck usb
Guess which one of these is my physical metaphor for Lambda.

Even better, Lambda is efficient in multiple ways:

  • Scales Up
    It’s design heavily encourages you to structure your code in a way that supports parallel processing. So if you jump from 100 to 100 million requests in a day, your app will won’t catch a server on fire.
  • Scales Down
    The flip side of this stereotypical scaling story is also true, that if you suddenly aren’t processing 100 million requests per day, then you aren’t paying anything for each one.
  • Right Sized
    For each Lambda instance you can tune how much memory it takes so you can easily tweak to fit a perfect price/performance ratio. Prior to Lambda you’d need to ballpark your processing and memory requirements across your whole application - which for most places translated into bumping up to the next tier of server “to be on the safe side” as predicting usage was so difficult.

Easy to Integrate with Events

Lambda functions are natively part of the AWS ecosystem and can be automatically kicked off when certain actions take place in other parts of your application.

For example: when an image is uploaded to S3, pass it to a Lambda and have it generate all the thumbnails for it.

This ability to set up events greatly reduces the amount of code and orchestration that you’d otherwise have to write.


A GOOD STARTING PLACE

If you’d like to get started with AWS Lambda, I’d recommend playing around with the JAWS framework: https://github.com/jaws-framework/JAWS

Official Docs: https://aws.amazon.com/lambda/


Read this Next: S3 Buckets of Objects

Hey, this is sponsored by SendCheckIt - and by "sponsored" I mean that's what I've been working on instead of updating this list. If you send email newsletters you'll probably like it.