Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Choose your certification →

Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

2.1.1.7. Durable Workflows and Cross-Account Event Routing (Step Functions, Lambda Durable Functions, EventBridge)

2.1.1.7. Durable Workflows and Cross-Account Event Routing (Step Functions, Lambda Durable Functions, EventBridge)

💡 First Principle: A process that must survive failures, retries and long waits needs its progress recorded outside any single compute invocation. Where that record lives (in a workflow service, or as checkpoints inside the function) decides how you build, observe and integrate the process.

Two ways to get durable execution:
"AWS Step Functions" (Standard)"Lambda durable functions"
How you define the workflowA state machine in Amazon States Language (or CDK), with a visual graphOrdinary code (JavaScript/TypeScript, Python, Java, Go, .NET) using the durable execution SDK
Where it runsA standalone workflow serviceInside Lambda
Maximum durationUp to one yearUp to one year per durable execution; each invocation still has the normal function timeout (15 minutes)
IntegrationsNative integrations with 220+ AWS servicesLambda's event-driven model; calls other services from code
Best fitOrchestrating many AWS services, visual design that non-developers can review, zero-maintenance runtimeLambda-centric application logic, code-first teams that unit-test with their language's frameworks
  • How durable functions work: The function wraps its handler with the SDK and gets a DurableContext. Steps run business logic with built-in retries and save their results as checkpoints. Waits suspend the function for a time period, an external callback or a polling condition, and you are not charged for compute while it waits. After a pause or a failure, Lambda invokes the function again from the start and replays the checkpoint log, so completed steps return their stored results instead of running again. Code outside steps must therefore be deterministic (no random numbers or current time outside a step). An execution timeout (up to one year) and a retention period for the execution history (1 to 90 days) are configured on the function.
  • Step Functions patterns to know: Standard workflows run up to a year with exactly-once workflow execution and full execution history; Express workflows are for high-volume, short (up to five minutes) event processing, so they cannot hold a multi-day approval. The callback pattern (.waitForTaskToken) pauses a task until an external system or a human returns the token. Distributed Map fans out across very large datasets such as millions of S3 objects.
  • Combining them: a common design keeps Step Functions for the cross-service business process and uses durable functions for the application logic inside one Lambda-based service.
Routing events across accounts and Regions with "Amazon EventBridge":
  • Bus-to-bus: A rule on the source event bus can target an event bus in another account, another Region (to supported destination Regions), or both. Two permissions must line up: the rule's IAM execution role in the source account must allow events:PutEvents on the target bus, and the target bus must accept the sender, through its resource-based policy (for example aws:PrincipalOrgID for the whole Organization) or an AWS RAM share. A missing permission shows up as FailedInvocations on the source rule, not as an error in the producer.
  • Direct cross-account targets: A rule can also deliver straight to an "SQS" queue, "SNS" topic, "Lambda" function, "Kinesis" data stream or "API Gateway" endpoint in another account in the same Region. The execution role lives in the source account and the target's resource policy must allow that role. The consuming team then runs no event bus or rules of its own. Delivery to another Region still goes bus-to-bus.
  • Central event hub: Member accounts forward selected events to a central bus, and rules there filter and fan out to automation. An archive on the central bus lets you replay past events into it, and a retry policy plus a dead-letter queue on each target handles transient delivery failures.
  • Regional resilience for ingestion: EventBridge global endpoints fail over event ingestion between a primary and a secondary Region based on a Route 53 health check, optionally replicating events to the secondary.

⚠️ Exam Trap: Choosing a Step Functions Express workflow (or an SQS delay queue, capped at 15 minutes) for a process that waits days for an approval or a partner callback. Long waits need Step Functions Standard or Lambda durable functions, and the requirement "keep the workflow as ordinary code" points to durable functions.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned