Glossary · Cloud & Hosting

AWS Lambda

AWS Lambda is a serverless compute service that runs your function code in response to events and bills for execution time instead of for idle servers.

Updated October 6, 2026

AWS Lambda is Amazon's serverless compute service. You upload a function, connect it to a trigger such as an HTTP request, a file upload or a schedule, and AWS runs it on demand without you managing servers.

Why it matters

Lambda removes server patching and capacity planning, and it scales by running more copies of the function in parallel. You are billed for the number of invocations and the memory and time each one uses, so spiky or low-traffic workloads can be cheap. It is a core building block for event-driven systems, webhooks and small APIs.

The limits matter too: a maximum run time per invocation, restricted local storage, and cold starts, the extra delay when a new execution environment must be created before your code runs.

Example

def handler(event, context):
    name = event.get("name", "world")
    return {"statusCode": 200, "body": f"Hello, {name}"}

Put this behind an API gateway and each request invokes handler. If no request arrives for a while, no environment is kept running for you.

Common mistakes

  • Opening a new database connection on every invocation and exhausting the database.
  • Assuming local files or memory persist between invocations.
  • Ignoring the concurrency limit, which can throttle requests during a spike.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.