diff --git a/aws_lambda_powertools/utilities/data_classes/common.py b/aws_lambda_powertools/utilities/data_classes/common.py index ce02a4c11b..8e2cea7a5c 100644 --- a/aws_lambda_powertools/utilities/data_classes/common.py +++ b/aws_lambda_powertools/utilities/data_classes/common.py @@ -16,7 +16,7 @@ def __init__(self, data: Dict[str, Any], json_deserializer: Optional[Callable] = data : Dict[str, Any] Lambda Event Source Event payload json_deserializer : Callable, optional - function to deserialize `str`, `bytes`, bytearray` containing a JSON document to a Python `obj`, + function to deserialize `str`, `bytes`, `bytearray` containing a JSON document to a Python `obj`, by default json.loads """ self._data = data diff --git a/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py b/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py index e62e307d67..a609dee821 100644 --- a/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py +++ b/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py @@ -39,7 +39,7 @@ def deserialize(self, value: Dict) -> Any: -------- ------ {'NULL': True} None {'BOOL': True/False} True/False - {'N': str(value)} str(value) + {'N': Decimal(value)} Decimal(value) {'S': string} string {'B': bytes} bytes {'NS': [str(value)]} set([str(value)])