Skip to content

AWS Lambda

#32 · Level 2 · Scaling and resilience · Serverless

In AWS Lambda you keep a small piece of code (a function) that runs on its own when something happens, then stops. That something is called an event — for example a file arriving in S3, or a request arriving at API Gateway. Lambda supports many languages, such as Python, Node.js, Java and .NET. When many events arrive at once, Lambda automatically runs many copies of the function. Running and maintaining servers is AWS’s job, and the function gets permission to use other services from an IAM Role.

A motion-sensor light at your front door. It turns on when someone comes, and turns off when they leave. You don’t have to keep the light on all night.

There’s no need to keep a server running all day. You pay only for the times your code runs — with light use, the cost is close to nothing. Even if a thousand requests arrive at once, it handles them on its own.

Shrinking an image when it’s uploaded to S3, API backends, building a report every night, and sending an email when a form is submitted.

Azure Functions

What is Serverless? · Amazon API Gateway · Amazon EventBridge

For details and the latest information, see the official documentation: