100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Cloud

AWS Lambda

By Amazon Web Services

IntermediateService12.9K learners

AWS Lambda is Amazon Web Services' serverless compute service that runs code in response to events without requiring the user to provision or manage servers, billing based on the number of invocations and execution time consumed.

Definition

AWS Lambda is Amazon Web Services' serverless compute service that runs code in response to events without requiring the user to provision or manage servers, billing based on the number of invocations and execution time consumed.

Overview

AWS Lambda, launched in 2014, was one of the services that popularized the 'serverless' model of computing: instead of provisioning and patching virtual machines, a developer uploads a function and AWS handles provisioning, scaling, and patching the underlying infrastructure automatically. Functions run in response to events — an HTTP request through API Gateway, a new object landing in Amazon S3, a message on a queue, a scheduled timer, or changes in a database stream — and Lambda scales the number of concurrent executions up or down automatically to match demand. Lambda supports multiple language runtimes (including Node.js, Python, Java, Go, .NET, and Ruby, plus custom runtimes via container images), with a maximum execution duration per invocation and configurable memory that also scales the allocated CPU proportionally. Because billing is based on actual invocations and execution time rather than reserved capacity, Lambda is well suited to spiky or intermittent workloads where paying for idle servers would be wasteful. A well-known trade-off is cold-start latency: when a function hasn't run recently, AWS needs to initialize a fresh execution environment before running the code, which adds latency to that particular request. Techniques like provisioned concurrency, smaller deployment packages, and choosing lighter runtimes are common ways teams mitigate this. Lambda is frequently used alongside services like AWS Fargate for longer-running container workloads and is a foundational building block covered in most AWS Solutions Architect curricula.

Key Features

  • Event-driven execution triggered by AWS services or HTTP requests
  • Automatic scaling of concurrent executions to match demand
  • Pay-per-invocation and per-millisecond execution pricing
  • Support for multiple language runtimes and custom container images
  • Configurable memory allocation that proportionally scales CPU
  • Maximum execution duration per invocation (currently 15 minutes)
  • Provisioned concurrency option to reduce cold-start latency
  • Deep integration with the broader AWS service ecosystem

Use Cases

Building REST or HTTP APIs behind API Gateway
Processing files automatically when uploaded to S3
Running scheduled jobs and cron-like automation tasks
Stream and queue processing for event-driven architectures
Backend logic for chatbots and lightweight automation
Glue code connecting multiple AWS services together
Real-time data transformation pipelines

Frequently Asked Questions