Expected Behavior
I expected the map operation to work without errors
Actual Behavior
An serialization error occurred. The code seems to wrap the function and return it as the result rather than calling it
ERROR:aws_durable_execution_sdk_python.serdes:⚠️ Serialization failed for id: 1712f93e2f51df042e2b933907d75accfe34a48fe4a42a24e0b08131bc72d591
Traceback (most recent call last):
File "/home/user/durable-lambda-test/.venv/lib/python3.12/site-packages/aws_durable_execution_sdk_python/serdes.py", line 464, in serialize
return active_serdes.serialize(value, serdes_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/durable-lambda-test/.venv/lib/python3.12/site-packages/aws_durable_execution_sdk_python/serdes.py", line 399, in serialize
encoded = self._codec.encode(value)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/durable-lambda-test/.venv/lib/python3.12/site-packages/aws_durable_execution_sdk_python/serdes.py", line 314, in encode
raise SerDesError(msg)
aws_durable_execution_sdk_python.exceptions.SerDesError: Unsupported type: <class 'function'>
Steps to Reproduce
from aws_durable_execution_sdk_python import (
DurableContext,
StepContext,
durable_execution,
durable_step,
)
@durable_step
def process_item(context, item, index, items):
return item
@durable_execution
def handler(event: dict, context: DurableContext) -> dict:
context.map(range(2), func=process_item)
### SDK Version
1.4.0
### Python Version
3.12
### Is this a regression?
No
### Last Working Version
_No response_
### Additional Context
This works if I remove the durable_step decorator on the map function
Expected Behavior
I expected the map operation to work without errors
Actual Behavior
An serialization error occurred. The code seems to wrap the function and return it as the result rather than calling it
Steps to Reproduce