Skip to content

Lambda

AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any application or backend service without provisioning or managing servers . You upload your code as a Lambda function, and AWS handles everything required to run and scale it with high availability across multiple Availability Zones .

This comprehensive guide covers everything you need to know about AWS Lambda, from core concepts to hands-on implementation and advanced optimization strategies.


AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you . It was launched in 2014 and pioneered the Function-as-a-Service (FaaS) model, becoming the backbone of serverless architecture on AWS .

BenefitDescription
No Server ManagementNo operating systems to patch, no instances to provision, no infrastructure to maintain. AWS handles the entire compute lifecycle .
Automatic ScalingScales instantly from zero to tens of thousands of concurrent executions. No capacity planning, no auto-scaling groups, no load balancers .
Pay-Per-Use BillingBilled per request and per millisecond of compute time. No charge when idle. Free tier covers 1 million requests and 400,000 GB-seconds monthly .
Event-Driven ArchitectureResponds to events from over 200 AWS services and custom applications.
Multiple Language SupportNative support for Node.js, Python, Java, Go, .NET, Ruby, and custom runtimes .

Understanding the following concepts is essential for working with Lambda .

A function is a resource that you can invoke to run your code in Lambda. It has code to process the events that you pass into the function or that other AWS services send to the function .

A trigger is a resource or configuration that invokes a Lambda function. Triggers include AWS services that you can configure to invoke a function and event source mappings. An event source mapping reads items from a stream or queue and invokes a function .

An event is a JSON-formatted document that contains data for a Lambda function to process. The runtime converts the event to an object and passes it to your function code .

Example custom event – weather data:

{
"TemperatureK": 281,
"WindKmh": -3,
"HumidityPct": 0.55,
"PressureHPa": 1020
}

Example service event – Amazon SNS notification:

{
"Records": [
{
"Sns": {
"Timestamp": "2019-01-02T12:45:07.000Z",
"MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e",
"Message": "Hello from SNS!"
}
}
]
}

An execution environment provides a secure and isolated runtime environment for your Lambda function. It manages the processes and resources required to run the function and provides lifecycle support .

You deploy your Lambda function code using a deployment package. Lambda supports two types:

TypeDescription
.zip file archiveContains your function code and dependencies. Lambda provides the operating system and runtime.
Container imageOCI-compatible image. You include operating system, runtime, code, and dependencies. Up to 10 GB .

The runtime provides a language-specific environment that runs in an execution environment. It relays invocation events, context information, and responses between Lambda and the function .

A Lambda layer is a .zip file archive that can contain additional code or other content such as libraries, a custom runtime, data, or configuration files. You can include up to five layers per function .

Lambda extensions enable you to augment your functions by integrating with monitoring, observability, security, and governance tools. An external extension runs as a separate process in the execution environment and can continue after function invocation completes .

Concurrency is the number of requests that your function is serving at any given time. When your function is invoked, Lambda provisions an instance to process the event. If invoked again while a request is still being processed, another instance is provisioned, increasing concurrency .

A qualifier specifies a version or alias when invoking or viewing a function. A version is an immutable snapshot with a numerical qualifier (e.g., my-function:1). An alias is a pointer to a version that you can update (e.g., my-function:BLUE) .

A destination is an AWS resource where Lambda can send events from an asynchronous invocation. You can configure destinations for both successful and failed processing .


AWS Lambda provides managed runtimes for popular languages. All runtimes support both x86_64 and ARM64 (Graviton2) architectures .

LanguageSupported VersionsRuntime Identifier
Node.js20, 22, 24nodejs24.x
Python3.10 – 3.14python3.14
Java8, 11, 17, 21, 25java25
.NET8, 10dotnet10
Ruby3.2, 3.3, 3.4ruby3.4
Govia provided runtimeprovided.al2023
Rustvia provided runtimeprovided.al2023
CustomAny languageprovided.al2023

Note: Amazon Linux 2 reaches end-of-life on June 30, 2026. Migrate runtimes using AL2 to AL2023 equivalents .


Lambda runs your code in response to events. Each invocation follows this lifecycle :

1. Event Trigger → 2. Initialize → 3. Execute → 4. Respond & Reuse
StepDescription
Event TriggerAn event source invokes your function: HTTP request, S3 upload, DynamoDB stream, SQS message, schedule, or any of 200+ AWS integrations.
InitializeLambda provisions a secure Firecracker micro-VM, loads your code and dependencies, and runs initialization logic outside the handler.
ExecuteYour handler function runs with the event payload. Lambda allocates CPU proportional to your memory setting (1,769 MB = approximately 1 vCPU).
Respond & ReuseThe function returns a response. The execution environment stays warm for subsequent invocations, avoiding cold starts.

A cold start occurs when Lambda provisions a new execution environment for a function that hasn’t been invoked recently. During a cold start, Lambda downloads your code, initializes extensions, and runs any initialization code outside your handler before your function can process the event.

RuntimeTypical Cold Start Duration
Node.js / Python50–200 ms
Java / .NET200 ms – 2 seconds
With SnapStart~0 ms (Java, Python, .NET)
With Provisioned Concurrency~0 ms (all runtimes)

5. Step-by-Step: Creating Your First Lambda Function

Section titled “5. Step-by-Step: Creating Your First Lambda Function”
  • An AWS account
  • AWS Management Console access or AWS CLI configured

Method 1: Using AWS Console (Quick Create)

Section titled “Method 1: Using AWS Console (Quick Create)”

Step-by-Step Instructions:

  1. Sign in to AWS Console and navigate to Lambda at https://console.aws.amazon.com/lambda/

  2. Click Create function

  3. Choose authoring option:

    • Author from scratch – Start with a blank function
    • Use a blueprint – Use pre-built examples
    • Container image – Deploy from ECR
    • Browse serverless app repository – Find pre-built applications
  4. Configure basic information:

    • Function name: Enter a descriptive name (e.g., my-first-function)
    • Runtime: Choose your preferred language (e.g., Python 3.14)
    • Architecture: x86_64 or arm64 (Graviton2 offers better price-performance)
  5. Permissions:

    • Change default execution role: Choose “Create a new role with basic Lambda permissions” for testing
  6. Advanced settings (optional):

    • Memory: 128 MB to 10,240 MB
    • Timeout: Up to 900 seconds (15 minutes)
    • Environment variables: Key-value pairs for configuration
  7. Click Create function

Python:

import json
def lambda_handler(event, context):
"""
Example Lambda function that processes incoming events.
Args:
event (dict): Event data passed to the function
context (LambdaContext): Runtime information
Returns:
dict: Response object
"""
print(f"Received event: {json.dumps(event)}")
# Extract name from event or use default
name = event.get('name', 'World')
return {
'statusCode': 200,
'body': json.dumps({
'message': f'Hello, {name}!',
'input': event
})
}

Node.js:

exports.handler = async (event) => {
console.log(`Received event: ${JSON.stringify(event)}`);
const name = event.name || 'World';
return {
statusCode: 200,
body: JSON.stringify({
message: `Hello, ${name}!`,
input: event
})
};
};

Create a Lambda function using the AWS CLI:

Terminal window
# Create a ZIP deployment package
zip function.zip index.js
# Create the function
aws lambda create-function \
--function-name my-cli-function \
--runtime nodejs20.x \
--role arn:aws:iam::123456789012:role/lambda-execution-role \
--handler index.handler \
--zip-file fileb://function.zip \
--memory-size 256 \
--timeout 10
const { LambdaClient, CreateFunctionCommand } = require('@aws-sdk/client-lambda');
const lambda = new LambdaClient({ region: 'us-east-1' });
const createCommand = new CreateFunctionCommand({
FunctionName: 'my-sdk-function',
Runtime: 'python3.14',
Role: 'arn:aws:iam::123456789012:role/lambda-execution-role',
Handler: 'lambda_function.lambda_handler',
Code: {
S3Bucket: 'my-deployment-bucket',
S3Key: 'function.zip'
},
MemorySize: 512,
Timeout: 30
});
const response = await lambda.send(createCommand);
console.log(`Function created: ${response.FunctionArn}`);

Lambda supports three invocation types :

Invocation TypeDescriptionUse Case
Synchronous (RequestResponse)Function executes and returns a response immediately. Client waits for result.API backends, microservices
Asynchronous (Event)Function is queued for execution. Client receives acknowledgment immediately without waiting.Event processing, S3 notifications
Poll-Based (Event Source Mapping)Lambda polls a stream or queue and invokes the function with batches of records.SQS, Kinesis, DynamoDB Streams

Synchronous invocation:

Terminal window
aws lambda invoke \
--function-name my-function \
--invocation-type RequestResponse \
--payload '{"name": "AWS User"}' \
response.json

Asynchronous invocation:

Terminal window
aws lambda invoke \
--function-name my-function \
--invocation-type Event \
--payload '{"name": "AWS User"}' \
response.json
const { LambdaClient, InvokeCommand } = require('@aws-sdk/client-lambda');
const lambda = new LambdaClient({ region: 'us-east-1' });
const invokeCommand = new InvokeCommand({
FunctionName: 'my-function',
InvocationType: 'RequestResponse',
Payload: JSON.stringify({ name: 'AWS User' })
});
const response = await lambda.send(invokeCommand);
const result = JSON.parse(new TextDecoder().decode(response.Payload));
console.log(result);

Lambda provides built-in HTTPS endpoints for your functions without needing API Gateway. Features include :

  • IAM authentication
  • CORS support
  • Response streaming
  • No additional cost
Terminal window
# Create a function URL
aws lambda create-function-url-config \
--function-name my-function \
--auth-type AWS_IAM

Lambda integrates natively with over 200 AWS services . Here are the most common event sources:

ServiceTrigger TypeCommon Use Case
Amazon S3Object creation/deletionImage resizing, file processing
Amazon API GatewayHTTP/REST API requestsWeb APIs, microservices
Amazon DynamoDBStream recordsReal-time data sync, change tracking
Amazon SQSQueue messagesDecoupled microservices, batch processing
Amazon SNSTopic notificationsFan-out messaging, alerts
Amazon EventBridgeSchedule or event patternCron jobs, event routing
Amazon KinesisData stream recordsReal-time analytics
Amazon MSK / KafkaTopic messagesStreaming data processing
CloudFront (Lambda@Edge)CDN requestsEdge computing, content personalization

To automatically process files uploaded to S3:

Terminal window
# Add S3 bucket notification to invoke Lambda
aws s3api put-bucket-notification-configuration \
--bucket my-source-bucket \
--notification-configuration file://notification.json

Where notification.json contains:

{
"LambdaFunctionConfigurations": [
{
"LambdaFunctionArn": "arn:aws:lambda:us-east-1:123456789012:function:process-file",
"Events": ["s3:ObjectCreated:*"]
}
]
}

8. Deployment Packages: ZIP vs. Container Images

Section titled “8. Deployment Packages: ZIP vs. Container Images”

Lambda supports two deployment package types .

FeatureZIP ArchiveContainer Image
Maximum size50 MB (direct upload) / 250 MB (S3)10 GB
RuntimeLambda providesYou provide
Operating SystemLambda provides (AL2/AL2023)You include
Custom dependenciesIncluded in ZIPIncluded in image
LayersSupportedNot supported
Startup timeFasterSlightly slower
Best forSimple functions, standard dependenciesML models, large binaries, custom environments
function.zip
├── index.js (or lambda_function.py)
├── node_modules/ (or other dependencies)
└── package.json (or requirements.txt)
FROM public.ecr.aws/lambda/python:3.14
# Copy function code
COPY app.py ${LAMBDA_TASK_ROOT}
# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Set the CMD to your handler
CMD ["app.lambda_handler"]

Build and push to ECR:

Terminal window
docker build -t my-lambda-image .
docker tag my-lambda-image:latest 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-lambda-repo:latest
docker push 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-lambda-repo:latest
# Create function from container image
aws lambda create-function \
--function-name my-container-function \
--package-type Image \
--code ImageUri=123456789012.dkr.ecr.us-east-1.amazonaws.com/my-lambda-repo:latest \
--role arn:aws:iam::123456789012:role/lambda-execution-role

Layers provide a convenient way to package libraries and dependencies that you can use with multiple Lambda functions .

Benefits of layers:

  • Reduce deployment package size
  • Promote code sharing across functions
  • Separate business logic from dependencies
  • Enable faster iterations

Example: Creating a Python layer with requests library

Terminal window
# Create directory structure
mkdir -p python/lib/python3.14/site-packages
# Install dependencies into layer directory
pip install requests -t python/lib/python3.14/site-packages/
# Create ZIP archive
zip -r requests-layer.zip python/
# Publish layer
aws lambda publish-layer-version \
--layer-name requests-layer \
--description "Requests library for Python" \
--zip-file fileb://requests-layer.zip \
--compatible-runtimes python3.14

Attaching a layer to a function:

Terminal window
aws lambda update-function-configuration \
--function-name my-function \
--layers arn:aws:lambda:us-east-1:123456789012:layer:requests-layer:1

Extensions enable you to integrate Lambda with monitoring, observability, security, and governance tools .

Extension types:

TypeDescription
Internal extensionRuns in the runtime process, shares the same lifecycle as the runtime
External extensionRuns as a separate process in the execution environment, initialized before function invocation, continues after invocation completes

Lambda runs your code within a VPC by default. You can optionally configure Lambda to access resources behind your own VPC, allowing you to leverage custom security groups and network access control lists .

To enable VPC access for your function:

Terminal window
aws lambda update-function-configuration \
--function-name my-function \
--vpc-config SubnetIds=subnet-12345678,subnet-87654321,SecurityGroupIds=sg-12345678
FeatureDescription
IAM IntegrationGranular permissions using IAM roles for execution and invocation
Code SigningVerify that unaltered code published by approved developers is deployed
EncryptionEnvironment variables can be encrypted with KMS
Resource-based policiesControl which accounts and services can invoke your function
IsolationEach function runs in an isolated Firecracker micro-VM on AWS Nitro
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"dynamodb:PutItem"
],
"Resource": [
"arn:aws:s3:::my-bucket/*",
"arn:aws:dynamodb:us-east-1:123456789012:table/my-table"
]
}
]
}

11. Performance Optimization: Cold Starts and Concurrency

Section titled “11. Performance Optimization: Cold Starts and Concurrency”

Strategies to reduce cold start latency :

StrategyDescriptionCost Impact
SnapStartCaches a snapshot of initialized execution environment. Up to 10x faster cold starts for Java, Python, and .NET.Free
Provisioned ConcurrencyPre-initializes specified number of execution environments. Eliminates cold starts completely.Additional charge per GB-second
ARM64 (Graviton2)Offers comparable or better cold start performance at 20% lower cost.Lower cost
Smaller deployment sizeMinimize code and dependencies to reduce load time.Free
Optimized initializationMove heavy initialization outside handler and reuse connections.Free

Concurrency controls :

ControlDescription
Reserved ConcurrencyGuarantees maximum concurrency for a function, protecting it from other functions in the account.
Provisioned ConcurrencyPre-initializes execution environments to handle expected load without cold starts.
Unreserved ConcurrencyThe pool of concurrency available to all functions without reserved concurrency.

Example: Setting reserved concurrency

Terminal window
aws lambda put-function-concurrency \
--function-name critical-function \
--reserved-concurrent-executions 100

Lambda provides built-in observability through :

ServicePurpose
Amazon CloudWatchCollects metrics (invocations, duration, errors, throttles) and logs
AWS X-RayDistributed tracing for request flows
CloudWatch Application SignalsApplication performance monitoring
MetricDescriptionAlarm Threshold
InvocationsNumber of function invocationsMonitor for spikes
DurationFunction execution time> 80% of timeout
ErrorsNumber of failed invocations> 0
ThrottlesNumber of throttled invocations> 0
ConcurrentExecutionsNumber of concurrent executions> 80% of limit
import json
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def lambda_handler(event, context):
# Structured logging with correlation ID
logger.info(json.dumps({
"event_type": "function_start",
"request_id": context.aws_request_id,
"function_name": context.function_name,
"event": event
}))
try:
result = process_event(event)
logger.info(json.dumps({
"event_type": "function_complete",
"request_id": context.aws_request_id,
"status": "success"
}))
return result
except Exception as e:
logger.error(json.dumps({
"event_type": "function_error",
"request_id": context.aws_request_id,
"error": str(e)
}))
raise

Lambda@Edge allows you to run Lambda functions across AWS locations globally in response to Amazon CloudFront events .

EventTimingUse Case
Viewer RequestWhen CloudFront receives a request from a viewerURL rewriting, authentication
Origin RequestBefore forwarding request to originHeader modification, request transformation
Origin ResponseAfter receiving response from originResponse transformation, caching control
Viewer ResponseBefore returning response to viewerResponse modification, A/B testing
// Viewer request function to redirect based on user agent
exports.handler = async (event, context) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
const userAgent = headers['user-agent'][0].value;
if (userAgent.includes('Mobile')) {
// Redirect mobile users to mobile site
const response = {
status: '302',
statusDescription: 'Found',
headers: {
location: [{
key: 'Location',
value: `https://m.example.com${request.uri}`
}]
}
};
return response;
}
return request;
};

AWS Lambda charges based on requests and duration. The free tier is generous and never expires .

Componentx86 PriceARM (Graviton2) Price
Requests$0.20 per 1 million$0.20 per 1 million
Duration$0.0000166667 per GB-s$0.0000133334 per GB-s
Provisioned Concurrency$0.0000041667 per GB-s$0.0000033334 per GB-s
Ephemeral Storage (above 512 MB)$0.0000000309 per GB-s$0.0000000309 per GB-s
  • 1 million requests per month
  • 400,000 GB-seconds of compute time per month
  • 100 GiB of response streaming per month

API handling 10 million requests per month (200ms avg, 256 MB memory):

Requests: 10M × $0.20/1M = $2.00
Duration: 500,000 GB-s × $0.0000166667 = $8.33
Free tier credit: (1M requests + 400K GB-s) = -$6.87
Total (x86): ~$3.46 per month
Total (ARM): ~$3.14 per month
StrategyDescriptionPotential Savings
Use ARM64 (Graviton2)20% lower cost with better price-performance20%
Right-size memoryMore memory allocates more CPU. Find optimal memory for your workloadVaries
Minimize durationOptimize code to run fasterVaries
Use SnapStartEliminates cold starts without Provisioned Concurrency costSignificant for Java
Clean up unused functionsDelete functions you no longer need100% of idle cost
Use Savings PlansCommit to consistent compute usage for up to 17% discountUp to 17%

Key limits to keep in mind when designing your Lambda architecture :

ResourceLimitNotes
Memory128 MB – 10,240 MBConfigurable per function
Timeout900 seconds (15 minutes)Maximum execution time
Package size (.zip)50 MB (direct) / 250 MB (S3)For ZIP deployments
Container imageUp to 10 GBFrom Amazon ECR
Ephemeral storage (/tmp)512 MB – 10,240 MBConfigurable
Concurrency1,000 per region (default)Can be increased
Payload (synchronous)6 MB request / 6 MB responseTotal combined size
Payload (asynchronous)256 KBFor event payloads
Layers per function5Maximum layers you can attach
Environment variables4 KB totalFor all variables combined
Function name length64 charactersMaximum

Lambda powers a wide variety of serverless applications :

Build scalable APIs that handle millions of requests. Pair with API Gateway or use Lambda Function URLs for simpler endpoints .

Example: E-commerce backend with product catalog, shopping cart, and checkout endpoints.

Process streams from Kinesis and DynamoDB, transform files uploaded to S3, or run event-driven ETL pipelines at any scale .

Example: Real-time log processing, clickstream analytics, data transformation.

Run recurring jobs using EventBridge Scheduler: cleanup routines, report generation, data syncs, and automated DevOps workflows .

Example: Daily database backup, weekly report generation, hourly data sync.

Resize images, transcode video, parse documents, or generate thumbnails automatically when files are uploaded to S3 .

Example: Serverless image processing pipeline that creates thumbnails and web-optimized versions.

Run ML models for real-time inference. Deploy models as container images (up to 10 GB) with GPU-optimized libraries .

Example: Fraud detection, sentiment analysis, image classification.

Build loosely coupled services communicating through SNS, SQS, and EventBridge. Scale each function independently .

Example: Order processing system with separate functions for validation, payment, inventory, and shipping.

Automate extraction, analysis, and validation of information from various document types using Lambda with AI services .

Example: Invoice processing, contract analysis, form data extraction.

Manage entire chatbot workflows including pre/post processing, prompt engineering, model selection, and guardrails .

Example: Customer service chatbot, AI-powered help desk, virtual assistant.


PracticeDescription
Make functions statelessStore state in databases or caches, not in function memory
Initialize outside handlerMove SDK clients, database connections, and heavy initialization outside the handler to reuse across invocations
Use environment variablesStore configuration values as environment variables, not hardcoded
Handle errors gracefullyImplement retry logic with exponential backoff for transient failures
Use dead-letter queuesConfigure DLQs for asynchronous invocations to capture failed events
PracticeDescription
Least privilege IAM rolesGrant only the permissions your function needs
Use execution rolesNever embed AWS credentials in function code
Encrypt sensitive dataUse KMS for environment variables and Secrets Manager for secrets
Enable code signingVerify that only approved code is deployed
Run in VPC when neededUse VPC for private resources, but avoid it for internet-facing functions
PracticeDescription
Right-size memoryTest different memory configurations to find optimal performance/cost balance
Use ARM64/Graviton2Better price-performance for most workloads
Enable SnapStart for JavaDramatically reduces cold start latency at no cost
Reuse connectionsUse connection pooling for databases and HTTP clients
Minimize deployment sizeRemove unnecessary dependencies from deployment packages
PracticeDescription
Implement structured loggingUse JSON format for easier log analysis
Set up monitoring and alertsConfigure CloudWatch alarms for errors and throttles
Use versioning and aliasesImplement blue-green deployments with aliases
Tag resourcesApply tags for cost tracking and resource management
Test locallyUse AWS SAM or Lambda RIE for local testing before deployment

This glossary includes key terms directly related to AWS Lambda.


Alias A pointer to a specific function version that you can update to map to a different version or split traffic between two versions. Example: my-function:BLUE .

ARM64 / Graviton2 64-bit ARM architecture for Lambda functions using AWS Graviton2 processors. Offers 20% lower cost and up to 34% better price-performance compared to x86_64 .

Asynchronous Invocation Invocation type where events are queued for processing. Lambda returns an acknowledgment immediately without waiting for the function to complete. Destinations can be configured for success and failure cases .


CloudWatch AWS monitoring service that collects Lambda metrics (invocations, duration, errors, throttles) and logs. Integrated with Lambda for built-in observability .

Code Signing Lambda feature that verifies that unaltered code published by approved developers is deployed in your functions. Provides trust and integrity controls .

Cold Start The latency experienced when Lambda provisions a new execution environment for a function that hasn’t been invoked recently. During a cold start, Lambda downloads code, initializes extensions, and runs initialization code before processing the event .

Concurrency The number of requests that your function is serving at any given time. Lambda provisions additional instances automatically as concurrency increases .

Container Image OCI-compatible deployment package type for Lambda functions. Supports up to 10 GB images from Amazon ECR. Requires you to include the operating system and runtime .


Destination An AWS resource where Lambda can send events from an asynchronous invocation. Supported destinations include SQS, SNS, Lambda, and EventBridge .

Deployment Package A ZIP archive or container image containing your function code and dependencies. Deployed to Lambda to create or update a function .


Event A JSON-formatted document containing data for a Lambda function to process. The runtime converts the event to an object and passes it to your function code .

Event Source Mapping A Lambda resource that reads items from a stream or queue and invokes a function with batches of records. Used for SQS, Kinesis, and DynamoDB Streams .

Execution Environment A secure and isolated runtime environment for your Lambda function. Manages processes and resources required to run the function .

Extension Code that augments your Lambda function by integrating with monitoring, observability, security, and governance tools. Can run as internal (in runtime process) or external (separate process) .


FaaS (Function-as-a-Service) Cloud computing model where developers write and deploy individual functions that execute in response to events. AWS Lambda pioneered this model in 2014 .

Firecracker Lightweight virtualization technology (also used by AWS Lambda) that powers Firecracker microVMs, providing secure, fast-booting isolation for each function invocation .

Function The core Lambda resource that contains your code and configuration. You invoke a function to run your code in response to events .

Function URL Built-in HTTPS endpoint for a Lambda function that enables direct invocation without API Gateway. Supports IAM authentication, CORS, and response streaming .


Instruction Set Architecture Determines the type of computer processor that Lambda uses to run the function. Choices: arm64 (Graviton2) or x86_64 .

Invocation A single execution of your Lambda function, triggered by an event source or direct API call.


Lambda@Edge Lambda feature that runs functions globally in response to Amazon CloudFront events (viewer/origin requests and responses) .

Layer A .zip file archive containing additional code, libraries, custom runtimes, data, or configuration files. Up to five layers per function. Contents are extracted to /opt in the execution environment .


Memory Compute resource allocated to Lambda functions ranging from 128 MB to 10,240 MB. CPU, network bandwidth, and disk I/O are allocated proportionally to memory .


Provisioned Concurrency Pre-initialized execution environments that remain initialized, eliminating cold starts. Ideal for latency-critical applications. Additional cost applies .


Qualifier Used when invoking or viewing a function to specify a version or alias. Example: my-function:1 (version) or my-function:BLUE (alias) .


Reserved Concurrency Concurrency limit guaranteed for a specific function. Protects the function from being throttled by other functions in the same account .

Runtime Language-specific environment that runs in the execution environment. Relays invocation events, context, and responses between Lambda and the function .


SnapStart Lambda feature that caches a snapshot of initialized execution environments. Provides up to 10x faster cold starts for Java, Python, and .NET at no additional cost .

Synchronous Invocation Invocation type where the client waits for the function to complete and returns the response directly. Used for API backends and microservices .


Timeout Maximum execution time for a Lambda function, configurable up to 900 seconds (15 minutes) .

Trigger A resource or configuration that invokes a Lambda function. Includes AWS services configured to invoke a function and event source mappings .


Version An immutable snapshot of a function’s code and configuration. Versions have numerical qualifiers (e.g., 1, 2, 3) and cannot be changed after creation .


X-Ray AWS distributed tracing service integrated with Lambda for tracing request flows through functions and downstream services .


ZIP Archive Deployment package type for Lambda functions. Contains function code and dependencies. Lambda provides the operating system and runtime .


AWS Lambda fundamentally changes how teams build and deploy applications by eliminating server management. With its event-driven architecture, automatic scaling, and pay-per-use pricing, Lambda enables developers to focus on business logic rather than infrastructure.

Key Takeaways:

  • Serverless compute - No servers to provision, patch, or manage. AWS handles everything .
  • Event-driven - Responds to events from over 200 AWS services and custom applications .
  • Automatic scaling - Scales from zero to tens of thousands of concurrent executions instantly .
  • Pay-per-use - Billed per request and per millisecond of compute time. Free tier covers 1M requests monthly .
  • Multiple languages - Native support for Node.js, Python, Java, Go, .NET, Ruby, and custom runtimes .
  • Flexible deployment - Deploy as ZIP archives or container images up to 10 GB .
  • Performance optimization - SnapStart, Provisioned Concurrency, and ARM64/Graviton2 options .

Getting Started Recommendations:

  • Start with the Lambda console using a simple Python or Node.js function
  • Use the free tier to experiment without cost
  • Add triggers from S3, API Gateway, or EventBridge to see event-driven architecture in action
  • Use Lambda Layers to share common dependencies across functions
  • Implement structured logging from the beginning