ENES

AWS Lambda

Run a piece of code only when something happens, with no server to manage.

Three event icons (an upload, a request, a clock) pointing at a lambda box that produces a result

Lambda lets you upload a function (a chunk of code in Python, JavaScript, Java and other languages) and tell AWS when to run it: when a file lands in Amazon S3, when an HTTP request arrives through Amazon API Gateway, when a message shows up in an Amazon SQS queue, or every day at 3 a.m. AWS finds a machine, runs your code, and throws the machine away. You never see a server.

You pay per request and per millisecond of execution. If nobody calls the function, the bill is zero. If a million people call it at once, AWS runs thousands of copies in parallel without you changing anything. The limits: one run lasts at most 15 minutes, and the first call after a quiet period is a bit slower (a cold start) while AWS prepares a fresh copy.

This is what people mean by serverless: there are still servers, but someone else owns them. A typical example: a photo app uploads an image to S3, which triggers a Lambda function that makes a thumbnail and stores it back. No machine sits idle waiting for the next photo.

Keep in mind

Go deeper

Related terms

More in AWS