File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
aws_lambda_powertools/utilities/idempotency Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -93,9 +93,11 @@ def handler(event, context):
9393 config = config or IdempotencyConfig ()
9494
9595 if hasattr (context , "state" ):
96- # Extract lambda_context from DurableContext for idempotency tracking
97- config .register_lambda_context (context .lambda_context )
98- is_replay = len (context .state .operations ) > 1
96+ # Extract lambda_context from DurableContext
97+ durable_context = cast ("DurableContext" , context )
98+ config .register_lambda_context (durable_context .lambda_context )
99+ # Note: state.operations is accessed via duck typing at runtime
100+ is_replay = len (durable_context .state .operations ) > 1 # type: ignore[attr-defined]
99101 else :
100102 # Standard LambdaContext
101103 config .register_lambda_context (context )
You can’t perform that action at this time.
0 commit comments