Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

AWS Lambda is a serverless compute service: you supply code as functions, and Amazon Web Services (AWS) manages the underlying compute infrastructure. Lambda runs a function in response to an event or API call, scales automatically, and charges for usage rather than requiring you to provision a server for each function.

How AWS Lambda works

A Lambda function is a unit of code with a configured handler—the entry point that processes an invocation. When an event triggers the function, the runtime prepares the event data and passes it, along with context information, to the handler. AWS runs the code in a managed, isolated execution environment.

Function lifecycle

A function environment moves through initialization, invocation, and shutdown phases. AWS may reuse an environment for another invocation, which can avoid repeating some setup work. Reuse is not guaranteed, however, so do not rely on memory in that environment to preserve user or application state between invocations. Store durable state in an appropriate data service instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Triggers and event sources

You can invoke a function directly or connect it to a trigger. For stream and queue sources such as Amazon Kinesis and Amazon SQS, an event source mapping polls the source, collects records into batches, and invokes the function with those records. The source and its delivery behavior affect how you design processing, retries, and idempotency.

Packages and permissions

Functions can be deployed as ZIP archives or container images, and each function has one configured handler. Permissions are a separate part of the setup: an execution role controls what AWS resources the function can access, while a resource-based policy can authorize a service or another principal to invoke it. Scope both kinds of permission to what the function actually needs.

What AWS Lambda is used for

Lambda is useful when code should run in response to events, scheduled work, or application requests. AWS examples include:

  • Processing a file after it is uploaded to Amazon S3.
  • Responding to database changes and automating data workflows.
  • Running scheduled or periodic tasks through Amazon EventBridge.
  • Processing streams for analytics or monitoring.
  • Providing web, mobile, IoT, or third-party API backends.
  • Coordinating long-running, multi-step work such as order processing, approvals, or data pipelines with durable functions.

Standard and durable functions

Standard Lambda functions can run for up to 15 minutes per invocation. Durable Lambda functions add checkpointed state for workflows that need to pause, resume, or retain progress across multiple steps; AWS describes durable workflows lasting up to one year. They can be a fit for waits or human-approval steps that do not fit into a single short execution. Check AWS documentation for current availability and limits before designing around a specific feature.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Features that affect design

Lambda offers options for deployment, performance, connectivity, and operations. Which ones apply depends on your runtime and workload; they are not all enabled by default.

  • Deployment and reuse: versions, layers, environment variables, code signing, and container images support packaging and release management.
  • Startup and response: SnapStart and response streaming address particular startup-latency or response-delivery needs.
  • Traffic and scaling: concurrency and scaling controls help manage how functions respond to incoming work.
  • Connectivity and extensions: VPC and file-system integrations, function URLs, and extensions support different networking, access, and observability patterns.

Review the AWS Lambda features documentation for compatibility and configuration details.

How Lambda pricing works

For standard functions, AWS pricing is based primarily on the number of requests and execution duration, measured in GB-seconds. Configured memory affects the resources allocated to a function and its duration charge. AWS’s pricing page listed a monthly free tier of 1 million requests and 400,000 GB-seconds when reviewed on October 7, 2026; check the live page for current terms and eligibility.

There is no single monthly cost that applies to every Lambda user. The bill depends on factors such as AWS Region, processor architecture, memory, execution time, request volume, and concurrency configuration. Optional features and related services—including provisioned concurrency, extensions, durable operations, storage, event polling, and connected AWS services—may add charges. Estimate a specific workload with the AWS Lambda pricing page and AWS Pricing Calculator rather than treating the free tier or a generic example as a guaranteed bill.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Benefits and trade-offs

AWS manages server maintenance and capacity provisioning, and Lambda scales automatically. Usage-based billing for standard functions can align compute charges with request volume and execution duration. These characteristics can reduce infrastructure operations for event-driven workloads.

Before choosing Lambda, assess whether the execution limits fit the work, whether startup latency is acceptable, how the event source behaves, and what concurrency and permission controls the design needs. Include the cost of connected services and optional features in the estimate. For a comparison with another compute option, evaluate workload duration, startup requirements, scaling pattern, integrations, security boundaries, operational responsibility, and total cost; there is no universal winner for every workload.

Official AWS documentation

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.