What is aws lambda

Last updated: April 1, 2026

Quick Answer: AWS Lambda is a serverless computing service that executes code in response to events without requiring server provisioning or management, charging only for actual compute time consumed in 100-millisecond increments.

Key Facts

What is Serverless Computing?

AWS Lambda is the foundational service of serverless computing—a paradigm where cloud providers manage infrastructure, scaling, and operations automatically. Instead of provisioning EC2 instances, managing autoscaling groups, or maintaining containerized environments, developers write functions and Lambda handles everything else. This approach eliminates operational overhead while enabling rapid deployment and automatic resource management.

How Lambda Works

You upload function code to Lambda along with its dependencies. When triggered by an event (API request, file upload, database change, scheduled time, or message queue), Lambda automatically allocates computing resources, executes the function, and returns results. The execution environment is ephemeral—containers spin up on-demand and tear down after execution. This event-driven model makes Lambda ideal for processing, transformations, and integrations that don't require continuous availability.

Supported Languages and Runtimes

Lambda provides managed runtimes for Python 3.x, Node.js, Java, C#/.NET, Go, Ruby, and PHP. Custom runtimes enable you to use virtually any programming language. Each runtime includes commonly needed libraries and integrates with Lambda's execution environment, providing context about invocation details, logging, and resource limits.

Event Sources and Triggers

Lambda functions integrate seamlessly with AWS ecosystem triggers:

Pricing and Cost Optimization

Lambda charges based on two dimensions: number of requests and compute duration in 1-millisecond increments. The free tier includes 1 million monthly requests and 400,000 GB-seconds of compute (equivalent to running a 128MB function for ~92 hours). This pricing model favors intermittent workloads—costs are zero when functions aren't running. For continuous workloads, traditional compute (EC2, Fargate, containers) may be more economical.

Limitations and Constraints

Lambda has specific constraints: maximum execution time of 15 minutes, temporary storage (/tmp) limited to 10GB, and payload size limits (6MB synchronous, 256KB asynchronous). For long-running or stateful workloads, these limitations may necessitate alternative services like Fargate or EC2.

Related Questions

What is the difference between AWS Lambda and Fargate?

Lambda is for event-driven functions with execution limits (15 minutes), while Fargate is for containerized applications that run continuously or long-running tasks. Lambda charges per-request and compute time; Fargate charges for reserved resources.

What are common use cases for Lambda?

Lambda excels at API backends, data processing pipelines, file transformations, real-time notifications, scheduled tasks, and IoT data ingestion. Any workload triggered by events or running intermittently benefits from Lambda's serverless model.

Can Lambda functions communicate with a VPC and databases?

Yes, Lambda can be configured to run within a VPC, enabling secure communication with RDS, DynamoDB, ElastiCache, and other private AWS resources. VPC configuration adds deployment latency (typically 10-20 seconds) due to ENI attachment.

Sources

  1. AWS Lambda Documentation CC-BY-SA-4.0
  2. Wikipedia - AWS Lambda CC-BY-SA-4.0