AWS Lambda
AWS Lambda is a serverless service that executes individual code in response to events. You don't provision servers - AWS starts, scales and terminates the execution environment automatically.
What is AWS Lambda?
AWS Lambda is AWS’s core serverless compute service. ‘Serverless’ does not mean that no servers are involved – it means that you do not have to worry about them. You simply upload your code as a function and define which event triggers it. AWS takes care of everything else: provisioning the execution environment, scaling, and shutting down once the work is done.
You’re billed by the millisecond and only for the actual execution time. If a function isn’t running, there are no costs. For workloads that are used irregularly, this is often significantly cheaper than a server running continuously.
How does Lambda work?
A Lambda function is triggered by an event. Typical triggers are:
- HTTP requests: Via the Amazon API Gateway, Lambda becomes the backend of a web or mobile application.
- File uploads: A new object in an S3 bucket automatically triggers a process, such as image optimisation.
- Messages: Entries from an SQS queue or an EventBridge event are processed.
- Schedules: Recurring tasks are executed on a schedule – similar to a cron job.
When there are many simultaneous events, AWS automatically launches multiple instances of the function in parallel. This horizontal scaling takes place automatically and without any configuration.
Advantages of AWS Lambda
- No server management: No operating systems, no capacity planning, no patches.
- Pay-as-you-go: You only pay for the actual execution time – there are no costs when the function is idle.
- Automatic scaling: From a single request to thousands of concurrent executions without manual intervention.
- Rapid implementation: Small functions for clearly defined tasks can be up and running in no time.
Limitations of Lambda
Lambda is not suitable for every workload. A function has a maximum runtime of 15 minutes and is therefore unsuitable for long-running processes. For rarely used functions, a so-called cold start can cause a brief delay. For applications with a consistently high sustained load, a container or EC2 setup is often more cost-effective.
Lambda for SMEs
Lambda is ideal for clearly defined tasks: processing webhooks, optimising images after upload, executing scheduled data exports or providing lightweight APIs. Many SMEs start with precisely these building blocks, thereby reducing the load on existing servers. It is important to use Lambda specifically for the right workloads, rather than forcing every application to be serverless.
Frequently asked questions about AWS Lambda
Lambda calculates the number of calls and the execution time in gigabyte seconds. The monthly free quota comprises one million calls. This keeps many small to medium-sized workloads in the cent to low euro range per month.
A cold start occurs when a function is called again for the first time after a long period of inactivity and AWS has to reinitialise the execution environment. This causes a short additional delay. This effect can be minimised for frequently used functions or with provisioned concurrency.
Lambda is suitable for event-driven, short-running tasks with fluctuating or infrequent loads. EC2 makes more sense for permanently high utilisation, long-running processes or when full control over the operating system is required.
Yes, a Lambda function may run for a maximum of 15 minutes. For longer processing times, other services such as AWS Fargate, batch processing or EC2 are the right choice.
Related terms
Last updated: May 2026