AWS Lambda vs Step Functions vs EventBridge
Overview
- AWS Lambda is a serverless compute service that runs code in response to events without provisioning or managing servers. It automatically scales from zero to thousands of concurrent executions and charges only for actual compute time consumed.
- AWS Step Functions is a serverless workflow orchestration service that coordinates multiple AWS services into visual workflows. It manages state, handles retries, error handling, and parallel execution using a declarative state machine model (Amazon States Language or visual Workflow Studio).
- Amazon EventBridge is a serverless event bus service that makes it easy to connect applications using events. It routes events from AWS services, SaaS applications, and custom sources to targets based on content-based filtering rules, enabling loosely-coupled event-driven architectures.
Key Concepts
- Lambda = Compute (execute code)
- Step Functions = Orchestration (coordinate services)
- EventBridge = Routing (connect event producers and consumers)
These three services are complementary and are frequently used together in modern serverless architectures. Lambda provides the compute, Step Functions coordinates the workflow, and EventBridge routes events between decoupled components.
Detailed Comparison Table
| Feature | AWS Lambda | AWS Step Functions | Amazon EventBridge |
|---|---|---|---|
| Primary Purpose | Serverless compute — run code | Workflow orchestration — coordinate services | Event routing — connect producers and consumers |
| Execution Model | Event-driven function invocation | State machine with defined steps | Event bus with rules-based routing |
| Max Duration | 15 minutes (standard); 8 hours (MicroVMs); 1 year (Durable Functions) | 1 year (Standard); 5 minutes (Express) | N/A — routes events, no execution duration |
| State Management | Stateless (Durable Functions add checkpointing) | Built-in state tracking between steps | Stateless — routes events only |
| Error Handling | DLQ, retry policies, destinations | Built-in Retry, Catch, fallback states | DLQ, retry policy (up to 185 retries over 24 hours) |
| Payload Size | 6 MB (sync); 1 MB (async, updated Jan 2026) | 256 KB per state | 1 MB (updated Jan 2026; billed per 64 KB chunk) |
| Concurrency | 1,000+ concurrent executions (configurable) | Standard: 2,000+ starts/sec; Express: 100,000 transitions/sec | Thousands of events/sec per bus |
| Workflow Visibility | CloudWatch Logs, X-Ray tracing | Visual execution history, step-by-step I/O | Enhanced logging (CloudWatch, S3, Firehose) |
| Direct Service Integrations | 220+ AWS services as event sources | 220+ AWS services via SDK integrations (1,100+ API actions) | 200+ AWS services, 45+ SaaS partners as sources; 20+ target types |
| Coupling | Tightly coupled to event source | Orchestrates tightly coupled steps | Loosely coupled — producers/consumers independent |
| Scheduling | Via EventBridge rule/scheduler trigger | Via EventBridge Scheduler or rule | Built-in Scheduler (cron/rate/one-time) |
| Free Tier | 1M requests + 400,000 GB-seconds/month | 4,000 state transitions/month | All AWS service events free; no free tier for custom events |
When to Use Which — Decision Guide
| Scenario | Recommended Service | Why |
|---|---|---|
| Simple event processing (transform, validate, enrich) | Lambda | Single function handles the entire task |
| Multi-step workflow with error handling and retries | Step Functions | Built-in retry, catch, and visual debugging |
| Fan-out events to multiple consumers | EventBridge | Content-based routing to multiple targets |
| Long-running process (human approval, wait for callback) | Step Functions or Lambda Durable Functions | Both support waiting up to 1 year; Step Functions for cross-service, Durable for code-first |
| Decouple microservices | EventBridge | Producers don’t need to know about consumers |
| Schedule tasks (cron jobs) | EventBridge Scheduler → Lambda | EventBridge handles scheduling, Lambda handles execution |
| AI/ML inference pipeline | Step Functions + Lambda | Orchestrate Bedrock, SageMaker calls with state management |
| SaaS integration (Stripe, Zendesk, Datadog) | EventBridge + Lambda | EventBridge receives partner events, Lambda processes |
| Parallel batch processing at scale | Step Functions Distributed Map | Process millions of items from S3 with up to 10,000 parallel child executions |
| Real-time data transformation | Lambda (with Kinesis/SQS trigger) | Sub-second processing of streaming data |
| Cross-account event routing | EventBridge | Direct cross-account delivery without intermediate bus |
| ETL pipeline with dependencies | Step Functions + Lambda | Sequential/parallel steps with data passing between stages |
Decision Framework
- Start with Lambda if you have a single task triggered by an event that completes within 15 minutes.
- Add Step Functions when your logic requires multiple steps, conditional branching, parallel execution, error recovery, or human-in-the-loop approvals.
- Add EventBridge when you need to decouple producers from consumers, route events to multiple targets based on content, or integrate with SaaS partners.
- Use Lambda Durable Functions (instead of Step Functions) when you prefer code-first orchestration within a single Lambda function and don’t need cross-service visual orchestration.
Architecture Patterns Combining All Three
Pattern 1: Event-Driven Microservices
Multiple microservices communicate through EventBridge. Each service publishes domain events, and EventBridge routes them to interested consumers (Lambda functions or Step Functions workflows).
- EventBridge — Central event bus for inter-service communication
- Lambda — Individual microservice handlers (order processing, notification, inventory)
- Step Functions — Complex business processes spanning multiple services (order fulfillment saga)
|
1 2 3 4 5 6 7 8 |
Order Service → EventBridge [OrderPlaced event] ├─ Rule → Lambda (Send confirmation email) ├─ Rule → Step Functions (Fulfillment workflow) │ ├─ Lambda (Reserve inventory) │ ├─ Lambda (Process payment) │ ├─ Lambda (Ship order) │ └─ EventBridge (Publish OrderShipped) └─ Rule → Lambda (Update analytics) |
Pattern 2: Saga Pattern for Distributed Transactions
Step Functions orchestrates a saga where each step has a compensating action. EventBridge decouples the saga from downstream services.
- Step Functions — Orchestrates the saga with Retry/Catch for each step
- Lambda — Executes each transaction step and its compensation
- EventBridge — Publishes saga completion/failure events to notify other bounded contexts
Pattern 3: Scheduled ETL with Event Notifications
- EventBridge Scheduler — Triggers the ETL workflow on a cron schedule
- Step Functions — Orchestrates extract → transform → load with error handling
- Lambda — Executes each ETL stage
- EventBridge — Publishes ETLComplete/ETLFailed events for downstream consumers
Pattern 4: AI/ML Pipeline with Human-in-the-Loop
- EventBridge — Receives document upload events from S3
- Step Functions — Orchestrates the pipeline: classify → extract → validate → approve
- Lambda — Calls Bedrock/Textract for AI processing
- Step Functions Wait — Pauses for human review via callback token
- EventBridge — Publishes ProcessingComplete event to downstream systems
Pattern 5: Fan-Out/Fan-In Processing
- EventBridge — Receives incoming event and triggers Step Functions
- Step Functions Distributed Map — Fans out to process thousands of items in parallel
- Lambda — Processes each individual item
- Step Functions — Aggregates results after all items complete
- EventBridge — Publishes aggregated results to interested consumers
Integration Points
Lambda ↔ Step Functions
- Step Functions can invoke Lambda functions directly using optimized integrations (no additional charges for Lambda invocation from Step Functions)
- Step Functions passes input/output data between Lambda steps automatically
- Lambda can start Step Functions executions via the AWS SDK
- Callback pattern — Step Functions sends a task token to Lambda; Lambda calls back when async work completes
- Activity tasks — Step Functions waits for external workers (Lambda or other compute) to poll and complete work
- Lambda Durable Functions (Dec 2025) — Provides Step Functions-like orchestration directly within Lambda code, blurring the boundary
Lambda ↔ EventBridge
- EventBridge can invoke Lambda as a target for matched rules (asynchronous invocation)
- Lambda can publish events to EventBridge via the SDK (PutEvents API)
- EventBridge Pipes — Connects event sources (SQS, Kinesis, DynamoDB Streams) to Lambda with built-in filtering and enrichment
- EventBridge Scheduler — Invokes Lambda on cron/rate/one-time schedules with 619+ SDK API actions (May 2026)
- Lambda Destinations — On success/failure, Lambda can route results to EventBridge
Step Functions ↔ EventBridge
- Step Functions can publish events to EventBridge directly from a workflow step (EventBridge PutEvents integration)
- EventBridge rules can start Step Functions executions as a target
- Step Functions emits execution status change events to EventBridge (RUNNING, SUCCEEDED, FAILED, TIMED_OUT, ABORTED)
- EventBridge Scheduler can trigger Step Functions workflows on a schedule
- Wait for Callback — Step Functions pauses and waits for an external event (potentially routed via EventBridge) to resume
All Three Together
- EventBridge routes an incoming event → triggers Step Functions workflow → Step Functions orchestrates multiple Lambda functions → publishes completion event back to EventBridge
- EventBridge Pipes can enrich events using Lambda before delivering to Step Functions
- Step Functions 1,100+ SDK integrations (Mar 2026) include direct EventBridge and Lambda actions without writing code
Pricing Comparison
| Dimension | AWS Lambda | AWS Step Functions | Amazon EventBridge |
|---|---|---|---|
| Pricing Model | Per request + per GB-second of compute | Standard: per state transition; Express: per execution + duration + memory | Per event published (per 64 KB chunk) |
| Request/Event Cost | $0.20 per 1M requests | Standard: $25.00 per 1M state transitions | $1.00 per 1M custom events |
| Compute/Duration Cost | $0.0000166667 per GB-second (x86); $0.0000133334 (ARM) | Express: $0.000001 per 100ms per 64 MB memory | N/A — no execution duration |
| Free Tier | 1M requests + 400,000 GB-seconds/month (permanent) | 4,000 state transitions/month (permanent) | All AWS service events free; Scheduler: 14M invocations/month free |
| Additional Costs | Provisioned Concurrency: idle + active charges; Ephemeral storage beyond 512 MB | Express execution charges; payload processing for large data | Pipes: per event + processing time; Schema Registry discovery: $0.10 per event |
Cost Optimization Tips
- Lambda — Use ARM/Graviton2 for 20% savings; right-size memory; use Provisioned Concurrency only for latency-sensitive paths
- Step Functions — Use Express Workflows for high-volume, short-duration workflows (up to 90% cheaper than Standard); minimize state transitions by combining logic in single Lambda functions
- EventBridge — Keep event payloads under 64 KB to avoid chunk-based billing; use input transformers to reduce payload size before delivery; AWS service events are always free
- Combined — Use Step Functions SDK integrations directly (DynamoDB, S3, SQS) instead of Lambda wrappers to save Lambda costs
Recent Updates (2025-2026)
AWS Lambda
- Lambda Durable Functions (Dec 2025) — Multi-step orchestration within Lambda code using steps and waits; auto-checkpoint, suspend up to 1 year, and recover from failures without Step Functions
- Lambda Managed Instances (Dec 2025) — Dedicated compute with EC2 flexibility; multi-request processing per execution environment; supports tag propagation (Jun 2026)
- Lambda MicroVMs (Jun 2026) — Container-based Firecracker snapshots with up to 8-hour runtime for long-running workloads
- 1 MB Async Payload (Oct 2025) — Asynchronous invocation payload increased from 256 KB to 1 MB
- ARC Region Switch ESM Block (May 2026) — Event source mapping execution block during regional failovers
AWS Step Functions
- 28 New Service Integrations + 1,100 API Actions (Mar 2026) — Including Amazon Bedrock AgentCore and Amazon S3 Vectors
- 100,000 State Machines per Account (Feb 2025) — 10x increase from previous 10,000 limit
- 137 Additional APIs + Backup Search (Apr 2025) — Expanded SDK integrations
- Distributed Map Enhancements (Sep 2025) — Additional data sources and observability metrics
- API-based Local Testing (May 2026) — Validate workflows before deploying to AWS
Amazon EventBridge
- 1 MB Event Payload (Jan 2026) — Maximum event size increased from 256 KB to 1 MB
- Cross-Account Direct Delivery (Jan 2025) — Deliver events to targets in another account without intermediate default bus
- Enhanced Visual Rule Builder (Nov 2025) — Intuitive console with event catalog for 200+ AWS services
- Enhanced Logging (Jul 2025) — Logging to CloudWatch Logs, S3, and Kinesis Data Firehose for event lifecycle tracking
- Scheduler 619 New SDK Actions (May 2026) — Including Lambda Managed Instances, 13 additional services
- MWAA Serverless Integration (Jun 2026) — EventBridge notifications for Airflow workflow state transitions
AWS Certification Exam Relevance
SAA-C03 (Solutions Architect Associate)
- Understand when to use Lambda vs Step Functions vs EventBridge for decoupling and orchestration
- Know EventBridge for event-driven architecture design and cross-account event routing
- Know Step Functions for workflow coordination with error handling
- Understand the Saga pattern using Step Functions for distributed transactions
- Know Lambda limits (15-min timeout, 6 MB sync payload, concurrency)
DVA-C02 (Developer Associate)
- Deeper knowledge of Lambda event source mappings, destinations, and error handling
- Step Functions Amazon States Language (ASL), Wait/Callback patterns, SDK integrations
- EventBridge rule patterns, input transformers, Pipes, and Scheduler
- Lambda Durable Functions vs Step Functions trade-offs
- Testing and debugging workflows (Step Functions local testing, EventBridge logging)
SAP-C02 (Solutions Architect Professional)
- Multi-account event routing with EventBridge (cross-account, cross-region)
- Complex workflow patterns: Saga, fan-out/fan-in, human-in-the-loop with Step Functions
- Cost optimization: Step Functions Standard vs Express, Lambda Provisioned Concurrency decisions
- Hybrid architectures combining all three services for enterprise event-driven systems
- Disaster recovery with Lambda ARC Region Switch and Step Functions execution history
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- A company has an e-commerce application where placing an order requires inventory reservation, payment processing, and shipping initiation. If any step fails, previous steps must be compensated (rolled back). Which architecture BEST implements this?
- Lambda function that calls each service sequentially with try/catch
- EventBridge rules that route events between each service
- Step Functions workflow implementing the Saga pattern with Catch and compensating states
- SQS queues between each service for reliability
Answer: C — Step Functions is ideal for the Saga pattern because it provides built-in Retry and Catch states, maintains execution history, and allows defining compensating actions for each step. EventBridge is for decoupling, not orchestrating sequential transactions with compensation.
- A company needs to route customer feedback events to different processing Lambda functions based on the sentiment (positive, negative, neutral) contained in the event payload. Which service should they use?
- AWS Step Functions with Choice state
- Amazon EventBridge with content-based filtering rules
- Amazon SQS with message filtering
- AWS Lambda with conditional logic
Answer: B — EventBridge excels at content-based routing where events are routed to different targets based on event payload content. Each rule can match specific patterns in the event JSON and route to different Lambda targets. This keeps services decoupled.
- A developer is building a document processing pipeline that takes 45 minutes to complete. The pipeline extracts text, classifies the document, and stores results. Which approach is MOST cost-effective?
- Single Lambda function with maximum 15-minute timeout chained via SQS
- Step Functions Standard Workflow orchestrating Lambda functions for each step
- Step Functions Express Workflow with Lambda functions
- EventBridge Pipes connecting each processing stage
Answer: B — Step Functions Standard Workflow supports executions up to 1 year and is appropriate for a 45-minute pipeline. Express Workflows are limited to 5 minutes. Chaining Lambda via SQS adds operational complexity. EventBridge Pipes is for point-to-point event streaming, not multi-step orchestration.
- A solutions architect needs to design a system where multiple microservices react to a single business event (e.g., “UserRegistered”) without the producing service knowing about the consumers. Which approach provides the MOST decoupled architecture?
- Lambda function invoking each consumer directly
- SNS topic with subscriptions for each consumer
- EventBridge custom event bus with content-based rules for each consumer
- Step Functions parallel state invoking each consumer
Answer: C — EventBridge provides the most decoupled architecture because producers publish events without knowing about consumers. Each consumer creates their own rule with content-based filtering. Unlike SNS, EventBridge supports schema discovery, event replay, and more sophisticated filtering. Step Functions and direct Lambda invocation create tight coupling.
- An application processes 500,000 short-lived events per hour, each requiring 3 state transitions. The team wants to minimize costs. Which Step Functions workflow type should they use?
- Standard Workflow
- Express Workflow
- Standard Workflow with Activity Tasks
- Lambda Durable Functions instead
Answer: B — Express Workflows are designed for high-volume, short-duration workloads and cost approximately $1.00 per million executions vs $25.00 per million state transitions for Standard. With 500K events × 3 transitions = 1.5M transitions/hour, Express saves significantly. Express supports up to 100,000 state transitions per second.
- A company operates in multiple AWS accounts and needs Service A in Account 1 to trigger a Lambda function in Account 2 when an order is placed. Which is the simplest approach with EventBridge?
- Send event to Account 2’s default bus, then create a rule targeting Lambda
- Use EventBridge cross-account direct delivery to invoke the Lambda in Account 2
- Use SNS cross-account subscription
- Use SQS cross-account queue
Answer: B — EventBridge now supports direct cross-account delivery (Jan 2025), eliminating the need to send events to the target account’s default bus first. This simplifies the architecture by allowing a rule in Account 1 to directly target a Lambda function in Account 2.
- A developer wants to build a multi-step AI workflow within a single Lambda function that checkpoints progress and can suspend execution while waiting for a human review. The workflow only involves Lambda logic (no other AWS service orchestration). Which feature should they use?
- Step Functions Standard Workflow
- Step Functions Express Workflow
- Lambda Durable Functions
- EventBridge with Lambda Destinations
Answer: C — Lambda Durable Functions (Dec 2025) provide code-first orchestration with steps and waits directly within Lambda. They’re ideal when the workflow logic stays within Lambda and doesn’t need visual cross-service orchestration. Durable functions automatically checkpoint progress and can suspend execution for up to 1 year.
- A team needs to process 10 million S3 objects in parallel, with each object requiring a Lambda function for transformation. Which Step Functions feature is BEST suited?
- Map state with MaxConcurrency
- Parallel state with multiple branches
- Distributed Map with up to 10,000 parallel child executions
- EventBridge with Lambda targets
Answer: C — Step Functions Distributed Map is specifically designed for large-scale parallel processing of items from S3 datasets. It supports up to 10,000 parallel child executions and can process millions of objects. The standard Map state is limited to 40 concurrent iterations.
- A company wants to trigger different processing pipelines based on the type of file uploaded to S3 — images go to a Rekognition pipeline, documents go to Textract, and videos go to MediaConvert. Which combination provides content-based routing? (Select TWO)
- S3 Event Notifications directly to each Lambda
- S3 → EventBridge rule with event pattern matching on object key suffix → different Step Functions targets
- S3 → Lambda → conditional invocation of each pipeline
- S3 → EventBridge rule with event pattern matching → different Lambda targets
- S3 → SQS → Lambda routing
Answer: B, D — EventBridge can receive S3 events and apply content-based filtering rules on the object key (suffix pattern matching) to route to different targets. Both Step Functions and Lambda can be valid targets depending on pipeline complexity. S3 Event Notifications lack content-based filtering on file type.
- Which statement BEST describes the relationship between Lambda, Step Functions, and EventBridge in a serverless architecture?
- They are competing services — choose one for your architecture
- Lambda handles compute, Step Functions handles orchestration, EventBridge handles event routing — they are complementary
- Step Functions replaces the need for both Lambda and EventBridge
- EventBridge replaces Step Functions for all workflow orchestration needs
Answer: B — These three services are complementary, not competing. Lambda provides serverless compute (executing code), Step Functions provides workflow orchestration (coordinating multiple services), and EventBridge provides event routing (connecting producers and consumers). Most serverless architectures use all three together.
References
- AWS Lambda Documentation
- AWS Step Functions Documentation
- Amazon EventBridge Documentation
- Lambda Durable Functions vs Step Functions
- Serverless Services Now Support Payloads up to 1 MB
- AWS Lambda Managed Instances
- Step Functions 28 New Service Integrations (Mar 2026)
- EventBridge Enhanced Visual Rule Builder
- EventBridge Enhanced Logging
- AWS Lambda Pricing
- AWS Step Functions Pricing
- Amazon EventBridge Pricing