AWS Security ChangesHomeSearch

AWS lambda documentation change

Service: lambda · 2026-01-28 · Documentation low

File: lambda/latest/dg/durable-examples.md

Summary

Reorganized documentation structure by moving the 'Chained invocations across functions' section, updated Python SDK import statements from 'aws_durable_execution_sdk' to 'aws_durable_execution_sdk_python', removed the section from its original position and re-added it later in the document, and added a reference to Step Functions comparison.

Security assessment

The changes involve documentation restructuring and SDK name corrections without any mention of security vulnerabilities, patches, or security features. The import statement updates are routine maintenance, and the section reorganization doesn't introduce or modify security-related content. No security implications were found in the diff.

Diff

diff --git a/lambda/latest/dg/durable-examples.md b/lambda/latest/dg/durable-examples.md
index a8d80512d..f234d8064 100644
--- a//lambda/latest/dg/durable-examples.md
+++ b//lambda/latest/dg/durable-examples.md
@@ -5 +5 @@
-Short-lived fault-tolerant processesLong-running processesChained invocations across functionsAdvanced patternsNext steps
+Short-lived fault-tolerant processesLong-running processesAdvanced patternsNext steps
@@ -55 +55 @@ Python
-    from aws_durable_execution_sdk import DurableContext, durable_execution
+    from aws_durable_execution_sdk_python import DurableContext, durable_execution
@@ -146 +146 @@ Python
-    from aws_durable_execution_sdk import DurableContext, durable_execution
+    from aws_durable_execution_sdk_python import DurableContext, durable_execution
@@ -279 +279 @@ Python
-    from aws_durable_execution_sdk import DurableContext, durable_execution, WaitConfig
+    from aws_durable_execution_sdk_python import DurableContext, durable_execution, WaitConfig
@@ -413 +413 @@ Python
-    from aws_durable_execution_sdk import DurableContext, durable_execution
+    from aws_durable_execution_sdk_python import DurableContext, durable_execution
@@ -485,141 +484,0 @@ The `new Date()` call and `calculateMsUntilHour()` function are outside steps an
-## Chained invocations across functions
-
-Invoke other Lambda functions from within a durable function using `context.invoke()`. The calling function suspends while waiting for the invoked function to complete, creating a checkpoint that preserves the result. If the calling function is interrupted after the invoked function completes, it resumes with the stored result without re-invoking the function.
-
-Use this pattern when you have specialized functions that handle specific domains (customer validation, payment processing, inventory management) and need to coordinate them in a workflow. Each function maintains its own logic and can be invoked by multiple orchestrator functions, avoiding code duplication.
-
-TypeScript
-    
-    
-    
-    import { DurableContext, withDurableExecution } from "@aws/durable-execution-sdk-js";
-    
-    // Main orchestrator function
-    export const handler = withDurableExecution(
-      async (event: any, context: DurableContext) => {
-        const { orderId, customerId } = event;
-        
-        // Step 1: Validate customer by invoking customer service function
-        const customer = await context.invoke(
-          "validate-customer",
-          "arn:aws:lambda:us-east-1:123456789012:function:customer-service:1",
-          { customerId }
-        );
-        
-        if (!customer.isValid) {
-          return { orderId, status: "rejected", reason: "invalid_customer" };
-        }
-        
-        // Step 2: Check inventory by invoking inventory service function
-        const inventory = await context.invoke(
-          "check-inventory",
-          "arn:aws:lambda:us-east-1:123456789012:function:inventory-service:1",
-          { orderId, items: event.items }
-        );
-        
-        if (!inventory.available) {
-          return { orderId, status: "rejected", reason: "insufficient_inventory" };
-        }
-        
-        // Step 3: Process payment by invoking payment service function
-        const payment = await context.invoke(
-          "process-payment",
-          "arn:aws:lambda:us-east-1:123456789012:function:payment-service:1",
-          {
-            customerId,
-            amount: inventory.totalAmount,
-            paymentMethod: customer.paymentMethod
-          }
-        );
-        
-        // Step 4: Create shipment by invoking fulfillment service function
-        const shipment = await context.invoke(
-          "create-shipment",
-          "arn:aws:lambda:us-east-1:123456789012:function:fulfillment-service:1",
-          {
-            orderId,
-            items: inventory.allocatedItems,
-            address: customer.shippingAddress
-          }
-        );
-        
-        return {
-          orderId,
-          status: "completed",
-          trackingNumber: shipment.trackingNumber,
-          estimatedDelivery: shipment.estimatedDelivery
-        };
-      }
-    );
-                
-
-Python
-    
-    
-    
-    from aws_durable_execution_sdk_python import DurableContext, durable_execution
-    
-    # Main orchestrator function
-    @durable_execution
-    def lambda_handler(event, context: DurableContext):
-        order_id = event['orderId']
-        customer_id = event['customerId']
-        
-        # Step 1: Validate customer by invoking customer service function
-        customer = context.invoke(
-            'arn:aws:lambda:us-east-1:123456789012:function:customer-service:1',
-            {'customerId': customer_id},
-            name='validate-customer'
-        )
-        
-        if not customer['isValid']:
-            return {'orderId': order_id, 'status': 'rejected', 'reason': 'invalid_customer'}
-        
-        # Step 2: Check inventory by invoking inventory service function
-        inventory = context.invoke(
-            'arn:aws:lambda:us-east-1:123456789012:function:inventory-service:1',
-            {'orderId': order_id, 'items': event['items']},
-            name='check-inventory'
-        )
-        
-        if not inventory['available']:
-            return {'orderId': order_id, 'status': 'rejected', 'reason': 'insufficient_inventory'}
-        
-        # Step 3: Process payment by invoking payment service function
-        payment = context.invoke(
-            'arn:aws:lambda:us-east-1:123456789012:function:payment-service:1',
-            {
-                'customerId': customer_id,
-                'amount': inventory['totalAmount'],
-                'paymentMethod': customer['paymentMethod']
-            },
-            name='process-payment'
-        )
-        
-        # Step 4: Create shipment by invoking fulfillment service function
-        shipment = context.invoke(
-            'arn:aws:lambda:us-east-1:123456789012:function:fulfillment-service:1',
-            {
-                'orderId': order_id,
-                'items': inventory['allocatedItems'],
-                'address': customer['shippingAddress']
-            },
-            name='create-shipment'
-        )
-        
-        return {
-            'orderId': order_id,
-            'status': 'completed',
-            'trackingNumber': shipment['trackingNumber'],
-            'estimatedDelivery': shipment['estimatedDelivery']
-        }
-                
-
-Each invocation creates a checkpoint in the orchestrator function. If the orchestrator is interrupted after the customer validation completes, it resumes from that checkpoint with the stored customer data, skipping the validation invocation. This prevents duplicate calls to downstream services and ensures consistent execution across interruptions.
-
-The invoked functions can be either durable or standard Lambda functions. If you invoke a durable function, it can have its own multi-step workflow with waits and checkpoints. The orchestrator simply waits for the complete durable execution to finish, receiving the final result.
-
-###### Note
-
-Cross-account invocations are not supported. All invoked functions must be in the same AWS account as the calling function.
-
@@ -728 +587 @@ Python
-    from aws_durable_execution_sdk import DurableContext, durable_execution, WaitConfig
+    from aws_durable_execution_sdk_python import DurableContext, durable_execution, WaitConfig
@@ -819,0 +679,141 @@ The process combines sequential steps with checkpoints for account creation and
+### Chained invocations across functions
+
+Invoke other Lambda functions from within a durable function using `context.invoke()`. The calling function suspends while waiting for the invoked function to complete, creating a checkpoint that preserves the result. If the calling function is interrupted after the invoked function completes, it resumes with the stored result without re-invoking the function.
+
+Use this pattern when you have specialized functions that handle specific domains (customer validation, payment processing, inventory management) and need to coordinate them in a workflow. Each function maintains its own logic and can be invoked by multiple orchestrator functions, avoiding code duplication.
+
+TypeScript
+    
+    
+    
+    import { DurableContext, withDurableExecution } from "@aws/durable-execution-sdk-js";
+    
+    // Main orchestrator function
+    export const handler = withDurableExecution(
+      async (event: any, context: DurableContext) => {
+        const { orderId, customerId } = event;
+        
+        // Step 1: Validate customer by invoking customer service function
+        const customer = await context.invoke(
+          "validate-customer",
+          "arn:aws:lambda:us-east-1:123456789012:function:customer-service:1",
+          { customerId }
+        );
+        
+        if (!customer.isValid) {
+          return { orderId, status: "rejected", reason: "invalid_customer" };
+        }
+        
+        // Step 2: Check inventory by invoking inventory service function
+        const inventory = await context.invoke(
+          "check-inventory",
+          "arn:aws:lambda:us-east-1:123456789012:function:inventory-service:1",
+          { orderId, items: event.items }
+        );
+